These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Requete where in (?)
PostPosted: Thu Nov 09, 2006 4:21 pm 
Newbie

Joined: Thu Nov 09, 2006 4:07 pm
Posts: 1
Location: Paris
Bonjour,

Je travaille avec Hibernate et Flex 2 et j'ai un problème avec une de mes requêtes.
La requête est de la forme :
"From Task where idProject in (?)"
Je ne sais pas à l'avance combien de paramètre j'aurai.

J'aimerai savoir : Que dois je mettre à la place de "?" ?

Merci d'avance.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 21, 2006 3:58 am 
Expert
Expert

Joined: Thu Sep 04, 2003 8:23 am
Posts: 368
Cela ne fonctionne pas avec les paramètres '?' mais fonctionne avec les paramètres de type ':maListe'.
Tu peux faire :
Code:
From Task where idProject in (:maListe)

_________________
Seb
(Please don't forget to give credits if you found this answer useful :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 21, 2006 9:31 am 
Newbie

Joined: Tue Nov 21, 2006 9:26 am
Posts: 2
Tu peux utiliser les Criteria

Criteria crit = session.createCriteria( ClassMappee.class);
crit.add( Expression.in( "champ", inList ) );

JBV.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.