java - Hibernate, online database and UPDATE -


We are currently planning an application and are looking to use Hibernate to access the database Online will be one, but the app should be able to work in offline mode Therefore, you can load the object from the database, close the connection, play with the object, and later update it into the database. The problem is that (well, as far as I know) an update on the database is hibernate, the object is modified at all times, which means that it could throw an exception if the connection was closed in the meantime. Now it is: Can manually be configured to update at specified time?

It seems that you can not fully understand the concept of using hibernate.

You can load the object in a session, then close the session and later merge that object in another session (or other object with the same identification) (so that the new session is between the middle Will be modified in the object). Meanwhile all sessions can be closed, and different objects can be used as a normal object (if you do not try to reach your unreleased lazy properties).

Also see:



Comments