Announcement Announcement Module
No announcement yet.
URGENT: @OneToOne mapping NOT on PK/FK Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?