Hibernate Team |
|
Joined: Tue Aug 26, 2003 7:19 pm Posts: 2364 Location: Brisbane, Australia
|
The first is updating the instance. All the data including the id (eg not null) is included with the instance. This instance is placed into the session cache. The second updates the data using using the supplied id thus the objects id, if it has one, is not important. If you view the code the first calls the second so the API to select depends on the circumstances you find you are in. For example, you don't have the access methods for the id on the class object. This is possible but not recommended.
|
|