CascadeType's individual descriptions may be a bit confusing, but there is an easy way to figure this out from the general case.
For any of the CascadeType values CascadeType this means that if an X operation is called on an instance using the EntityManager interface, and this instance has references to other entity instances and this association has CascadeType.X , then the EntityManager operation will also be applied to this associated object.
So EntityManager.refresh() is defined as:
Update the state of the instance from the database, the changes made to the entity, if any.
So, if object A has a reference to object B, and that link is annotated with @CascadeType.REFRESH and EntityManager.refresh(A) is called, then EntityManager.refresh(B) also implicitly called.
skaffman Sep 10 '09 at 6:57 2009-09-10 06:57
source share