Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Criteria Query with Composite Key Table
 
Similar Threads
component class not found exception
Criteria Qurey for Composite key table
Problems with Editable Datatable
Composite Id --- Error in Reading the mapping file
Adding data using hibernate for Composite primary keys