Monday, 13 December 2010

CascadeType Explained

PERSIST
maps to EnityManager.persist(). Make an instance managed and persistent.
MERGE
maps to EnityManager.merge(). Merge the state of the given entity into the current persistence context.
REMOVE
maps to EnityManager.remove(). Remove the entity instance.
REFRESH
maps to EnityManager.refresh(). Refresh the state of the instance from the database, overwriting changes made to the entity, if any.
ALL
all of the above

References



Java Persistence with Hibernate
Christian Bauer, Gavin King

No comments:

Post a Comment