If you change something in an object, and your cascade setting is enabled (e.g. set to save-update), Hibernate will detect that change and persist it to db whenever you close the session (it checks for updates during session closing). You can put this line into your config file:
<property name="hibernate.connection.autocommit">false</property>
This should disable the auto-flush during session commit. However, from there on you will have to call session.flush() yourself whenever you want to commit changes (after save, update, etc.).
HTH,
Bratek
|