posted 16 years ago
Hi,
I have two tables say X and Y, with a join table X_Y. now there is a Z table which can be associated with X and Y tables somehow (with a foreign key).
But my issue is that I have a U table which is not associated with X and Y or Z for that matter in any ways. How do I :
Write query for such a scenario? (meaning how will hibernate be able to generate where U.id = "SOME_ID" for a query on X and y); to illustrate heres what i mean :
Select x_.Name,
y_.name,
from X x_
LEFT OUTER JOIN
X_Y ASSOCIATE_
ON ASSOCIATE_.ID = x_.ID
LEFT OUTER JOIN
Y y_
ON ASSOCIATE_.ID = y_.ID
WHERE U.ID = ?
Any kind of help (you can tell me the SQL too ... )
Rick.
[ April 03, 2008: Message edited by: Anirudh Vyas ]