Hai,
This is related to my previous post:
http://forum.hibernate.org/viewtopic.php?t=954696
I have a table EMPLOYEE with the following columns.
1. EmployeeId
2. Employee name
3. ManagerId (Foreign key on the same table's (EMPLOYEE table) EmployeeID)
Now I should be able to insert 2 Employee objects First one is the
manager of second Employee.
When I save an Employee Object1 (Employee who is a Manager) it should save it,
generate an Employee ID and use it to store the second Employee Object2 (Employee who is not a manager and has the managerId as the First Object's EmployeeId) all at one go.
How do I achieve it?
If the Manager table and Employee are different Iam able to achieve this?
But how do I do if they are to be updated in the same table?