Thanks for reply!
I set cascade style of association to "all". Doesn't it mean that it will
include "refresh". This if from hibernate doc:
>>>>
Setting a value of the cascade attribute to any meaningful value other than none will propagate certain operations to the associated object. The meaningful values are the names of Hibernate's basic operations, persist, merge, delete, save-update, evict, replicate, lock, refresh, as well as the special values delete-orphan and all and comma-separated combinations of operation names, for example, cascade="persist,merge,evict" or cascade="all,delete-orphan"
>>>>
======
I think that my problem is rather typical - i have a dialog that
is used to edit object X and it's associations. If user made some
changes to object X and pressed Cancel button on dialog i want
to discard those changes.
Is it a correct solution to call Evict before Refresh to clean associations?
|