This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am trying to figure out how to join tables using criteria. I have successfully been able to get records out of one table and pared down the results using Projections.
We have a table called listing that contains a bunch of records. they are joined to another table called pagers. there is a one to many relationship from listing to pagers (one listing record may have multiple pagers associated with it). the main issue I am having is retrieving any data out of the pager table. I think I have the associationPath wrong, which is where I am having problems. There aren't many good examples out on the web doing this kind of a thing and the Cat/kittens examples from the hibernate docs aren't helping.
Here is the criteria query I am using (I am passing in a name and if :
Thanks in advance for any help you can give to me! Let me know if you need any more info.
Joined: Nov 13, 2006
alright.. let me rephrase this question using the examples from the hibernate documentation. since the documentation always talks about joining a table to itself using the cats/kittens analogy I'll use that as an example but move up one step to an owner of a cat/kittens that also owns dogs/puppies.