Wednesday, May 6, 2009

Cascade Attribute in Hibernate

none
ignore the association.
save-update
navigate the association when the transaction is committed and when an object is passed to save() or update() and save newly instantiated transient instances and persist changes to detached instances.
delete
navigate the association and delete persistent instances when an object is passed to delete().
all
cascade both save-update and delete as well as calls to evict and lock.
all-delete-orphan
the same as cascade "all" but in addition deletes any persistent entity instance that has been removed (dereferenced) from the association (for example from a collection).
delete-orphan
delete any persistent entity instance that has been removed (dereferenced) from the association (for example from a collection).

No comments:

Post a Comment