I can see 2 problems -
Merge is used for -
Quote:
Copy the state of the given object onto the persistent object with the same identifier. If there is no persistent instance currently associated with the session, it will be loaded. Return the persistent instance. If the given instance is unsaved, save a copy of and return it as a newly persistent instance. The given instance does not become associated with the session.
Try replacing session.merge(person2) with session.update(person2)
Also, the instance being ignored is of type - com.abc.def.model.Person , but the mapped one is of type - com.drkw.scd.model.Person. The package names and hence the classes are different.
Perhaps you can post your imports as well.
Are you getting any exceptions?