This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Query consilidation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Query consilidation" Watch "Query consilidation" New topic
Author

Query consilidation

Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
I have a table that references another table in a one to many relationship. I have the name of one of the objects in the table, and I want to find all of the other objects in the table that refer to the same object in the other table as one that I have. It's not as confusing as it sounds. I've gotten it to work with the following setup. I'm just not sure how to make them work as one query instead of two.

Tomasz Szymanski
Greenhorn

Joined: Jan 11, 2010
Posts: 23
Wouldn't this work?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Query consilidation
 
Similar Threads
sql-statement in tuple
problem persisting an object with collections and manytomany relationship
Join Fetch using EclipseLink
Hibernate Query
Hibernate Select - Criteria with a Date