|
With respect to refreshing entities, JPA 2.1, section 3.2.5, "Refreshing an EntityInstance" says this:
"The semantics of the refresh operation, applied to an entity X are as follows: • If X is a managed entity, the state of X is refreshed from the database, overwriting changes made to the entity, if any. The refresh operation is cascaded to entities referenced by X if the relationship from X to these other entities is annotated with the cascade=REFRESH or cascade=ALL annotation element value. • If X is a new, detached, or removed entity, the IllegalArgumentException is thrown."
In other words, a new instance should not be ignored.
|