Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EclipseLink, Query-By-Example for Entilty with One-To-Many relationship

 
siv sanny
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I ma using EclipseLink 1.2, I wanted to know how to use Query-By-Example for One-To-Many relationship ?

I have two entities ResultGroup and CssObject.
ResultGroup has a unidirectional one-to-many relationship with CssObject. I want to find all the group objects that match a condition on child CssObject.



This code returns all group objects. am I doing something wrong ? How can I make it return only those objects that satisfy the specified condition ?

Thanks
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!