Hello hibernate community - I've been using hibernate for the last 12 months with a great deal of success. I just wanted to clarify some of the write semantics.
My understanding was that after hibernate pulls an object out of the database that object is not is not WRITTEN back to the database until I explicitly write it (in my case using getHibernateTemplate().update(myObject)). However, I noticed that whenever I update an object in memory it is written back to the database when my session is closed, even if I do not explicitly save it. I have confirmed this by looking at the SQL dumps.
Does this have to do with the FlushMode.MANUAL versus FlushMode.AUTO? In my case the flush mode is set to AUTO. If this is the case, why bother explicitly writing an object if flushing the session has the same effect?
I've searched for a solution / explanation in the docs and have extensively debugged my own system before asking this question. Many thanks for your responses.
regards,
anish
Hibernate version: 3
Name and version of the database you are using: mysql 5
|