gcook1@shaw.ca wrote:
There is an option in your hbm.xml file that says dynamic-update=true and dynamic-insert=true.
By default these are set to false (I belive). Setting these to true will ensure that insert/update statements will only include the things that have been changed
Sorry, I've stated something you were already aware of. I've used the cascade option and it works fine for me with the dynamic-update=true.
You also want a new session for each call to the DB to avoid prolonged table locking...
My opinion is if you need to manage the state (or knowledge of the state of your objects) on your own instead of relying on the ORM tool for you, I'd advise not using that ORM tool.