File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
 
Similar Threads
Problems with Editable Datatable
component class not found exception
Composite Id --- Error in Reading the mapping file
Criteria Qurey for Composite key table
Adding data using hibernate for Composite primary keys