Hi, I am stucked in generating a mapping file for joins and need urgent help.
create table X (
ID ....
NAME...
Y_ID....
);
create table Y (
ID .....
LOCATION ...
);
( there is one - to - many relation between X and Y)
How can I tell hibernate in the mapping file that Y_ID is the ID field of table Y , so he can save me from join queries?
(Dont offer me to merge X and Y, I know -))
I mean : I want to write Select from X where Id = ".."
and in return I want to get both X attributes and acording to the matching (Y_ID) 's , all Y's attributes, together
|