-->
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: Problem doing Query By Example
PostPosted: Wed May 10, 2006 3:54 am 
Regular
Regular

Joined: Tue Mar 23, 2004 2:10 am
Posts: 51
Hibernate version:3.1.2 cr2

Hi,
I just want to ask that does Query by Example supports associations or not. e.g. If i have bi-dircetional one to many relationship in Department and Employee domain objects and i want to use query by example for Employee object and then set DepartmentModel in it with department id given then will i be returned list of all object of Employee belonging to that department?. I tried but query by example did not included in where clause (My employee models all properties was null and inside it Department model was set to a new Department object having its id defined.)
I think it should have worked because it is quite comon case. Because in DB u have department_id as foriegn key in Employee Table so if i was not using relationships or association then it would be quite easy to set the departmentId property of employee model and then search it using query by example. Any help is very much appreciated in this regard.

Best Regards,
Shoaib Akhtar


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 18, 2006 7:42 am 
Regular
Regular

Joined: Tue Mar 23, 2004 2:10 am
Posts: 51
Reply Plz


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 18, 2006 8:52 am 
Expert
Expert

Joined: Tue Apr 25, 2006 12:04 pm
Posts: 260
There was a post yesterday someone saying Query-By-Example doesnt work with collection. So your guess may be correct.

And this is the link (http://forum.hibernate.org/viewtopic.php?t=959586)


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.