Hibernate inheritance insert child after parent
===

I have a Hibernate, spring and GWT application. I have two tables: Employee and user.

Every user is an employee and thus I have OneToOne relation and User extends Employee. Things work fine when I insert user first, it auto inserts parents correctly. However, the problem is when I try to add the user entry for an existing employee, which instead of inserting the user record with the parent Id, it re-creates the employee record and user record.

Is this the right way to do things? How can I overcome this?

Thank you very much.