Hi,
Here's the scenario: I load an object from db, and create a bunch of child objects in it (simply as space holders). When the load method returns, and transaction is committed, cascading triggers an automatic flush, and all my temporary objects are being saved to db, without me even calling save or update methods. Is there a way to tell Hibernate to use cascade only when save or update method is called?
BTW, all my hibernate mapping files have this header:
<hibernate-mapping default-cascade="save-update">
But it doesn't look like this is helping.
I'd appreciate any help on the subject. Thank you,
Bratek
|