![]() |
![]() |
|
| Index | Recent Threads | Unanswered Threads | Who's Online | Help |
|
|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 5
|
|
| Author |
|
|
Newbie Joined: May 3, 2006 Post Count: 9 Status: Offline |
Hello, I have 2 classes Critere and SousRubrique. Each class have a reference to the other. And I want to get all the Critere objects which have a specified SousRubrique. Here is my pojos : and my metadata file : So when I try to get the Critere objects by this way : I have this error : javax.jdo.JDODataStoreException: Error executing JDOQL query "SELECT 'modele.pojos.Critere' AS JPOXMETADATA,THIS.ID_CRITERE,THIS.NOM,THIS.NON_AFFICHE FROM CRITERES THIS WHERE EXISTS (SELECT 1 FROM ASSO_SOUS_RUBRIQUES_CRITERES THIS_SOUSRUBRIQUES_SR,SOUS_RUBRIQUES UNBOUND_SR WHERE THIS_SOUSRUBRIQUES_SR.ID_CRITERE = THIS.ID_CRITERE AND THIS_SOUSRUBRIQUES_SR.ID_CRITERE = THIS.ID_CRITERE AND UNBOUND_SR.ID_SOUS_RUBRIQUE = THIS_SOUSRUBRIQUES_SR.ID_SOUS_RUBRIQUE)" : Erreur de syntaxe près de 'EXISTS (SELECT 1 FROM ASSO_SOUS_RUBRIQUES_CRITERES THIS_SOUSRUBR' à la ligne 1I also tried like this : But I get the same error ---------------------------------------- [Edit 1 times, last edit by stephbibie at May 22, 2006 4:04:25 PM] |
||
|
|
Expert Belgium Joined: Mar 12, 2004 Post Count: 2991 Status: Offline |
This query should work, but it seems your database does not support it. which db are you using? we can try to find a workaround ---------------------------------------- Erik Bengtson ![]() |
||
|
|
Newbie Joined: May 3, 2006 Post Count: 9 Status: Offline |
I'm using MySQL 4.0.15 database |
||
|
|
Expert UK Joined: Mar 13, 2004 Post Count: 5686 Status: Offline |
I'm using MySQL 4.0.15 database Use of EXISTS is stated in the JPOX docs http://www.jpox.org/docs/1_1/rdbms.html as only being supported by MySQL from 4.1 ---------------------------------------- -Andy ![]() ![]() |
||
|
|
Newbie Joined: May 3, 2006 Post Count: 9 Status: Offline |
You're right, I updated my MySQL version and now it works. Thanks a lot ! |
||
|
|
|
|
|
Current timezone is GMT May 17, 2012 11:15:32 AM |