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 querying two tables using criteria Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "querying two tables using criteria" Watch "querying two tables using criteria" New topic
Author

querying two tables using criteria

Manon Baratt
Ranch Hand

Joined: Jan 30, 2006
Posts: 58
Hi,

I have two tables that share the same heading_key column. I am using the following statement using criteria to retrieve the headingcode:

my xml files are defined:

customer:

Heading:

The query I get from hibernate is:

Which is what I want minus the second to the last line. What I am doing wrong?

Thanks for your help.

 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: querying two tables using criteria
 
Similar Threads
hibernate update in single transcation
Hibernate Select - Criteria with a Date
hibernate, ant task, hbm2java, code generation and circular dendency?
Native SQL in Mapping File For a Property
What does hibernate think is "dirty" here?