posted 15 years ago
Hello,
I have two tables "User" and "Adress" with an optional ONE-TO-ONE Relationship:
"User" has a composite key and Adress takes this composite key as its primary key:
USER:
------
ID_A (PK)
ID_B (PK)
ADRESS:
------
ID_A (PK, FK)
ID_B (PK, FK)
I mapped it like this:
Now, when I do a HQL-Query like:
Hibernate prints this sql:
So you see, the SQL is false, as it contains the "user0_.adressas adressid641_", but adress should be a relationship to the Adress-Table.
What is wrong with my mapping?