-->
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.  [ 4 posts ] 
Author Message
 Post subject: query in a list of String
PostPosted: Tue Apr 13, 2004 10:35 am 
Newbie

Joined: Tue Apr 13, 2004 10:21 am
Posts: 5
I have a domain class A that contain a list of String.

I want to retrieve all A instances that have a String equals to "example" in it's
collection. I don't need to initialize String collection.

How can i do ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 13, 2004 12:41 pm 
Newbie

Joined: Thu Nov 13, 2003 12:03 pm
Posts: 18
Location: France
You could be a little bit more precise.
That mights help :
http://www.hibernate.org/118.html#A12


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 14, 2004 4:51 am 
Newbie

Joined: Tue Apr 13, 2004 10:21 am
Posts: 5
thank you. But i'd like to do this using hql or criterias.
My db doesn't support subquery.

My domain class is like

class A {
private Long id;
private List labelList; // list of String

// getters and setters
// ......
}

I want to retrieve all A instance that has "coucou" in its labelList.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 14, 2004 5:10 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
select a from A as a where 'example' in elements (a.labelList)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.