Hi All, I have two tables having one-to-one relationship where child table has the primary key of parent table as foreign key. I used <one-to-one> tag in parent table and <many-to-one> in child table but it is searching the child record.
Can anyone help me out??
posted 8 years ago
This sounds a little odd. If you have a <many-to-one> relationship within the child table, this would indicate that the parent table could have many children, and thus the relationship between the parent and the child should then be <one-to-many>.
Might be best if you could show us your mapping files. Or if you are not using mapping files, show us the two classes with the associated annotations.