This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Criteria Query with Composite Key Table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Criteria Query with Composite Key Table" Watch "Criteria Query with Composite Key Table" New topic
Author

Criteria Query with Composite Key Table

Phoenix Kilimba
Ranch Hand

Joined: Oct 10, 2006
Posts: 64
Dear Sirs et Madames,

I am stuck, and have been stuck on this issue for a little less than a week now, and I fear for my sanity if I do not get a solution soon. The situation is this, I have a table with a composite key. However I am interested in extracting all data from this table where just one of the keys match (group_id). The following is my mapping file (hibernate)

GroupAttributeString.java looks thus



GroupAttributeStringId.java:

And lastly, this is an excerpt from GroupAttributeStringDAOConcrete.java, where am attempting to extract all rows which have a particular group_id:



I know am not doing it right as am getting no resultset whatsoever (no exceptions though).

Would anyone be able to save my follicles by helping me out here?
thanks in advance...


You are what you know
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Criteria Query with Composite Key Table
 
jQuery in Action, 3rd edition