Nov 3rd, 2009, 11:48 AM
URGENT: @OneToOne mapping NOT on PK/FK
Sorry about the Urgent, I am supposed to finish this today.
1) I am mapping 2 tables (employee and person) that I cannot change. Both tables contain an employeeId and have a 1-1 relationship based on it, but the employeeId column is NOT the PK in either table. The @OneToOne mapping seems to require something like employee.personID to map to the PK of person.
How can I map the relationship based on employeeId column?
2) Again, in the employee table, I have a supervisorId column (this one does contain the PK).
How do I map the relationship from employee to employee based on the supervisorId?