JPA Method
in javax.persistence.EntityManager

T merge(
  T entity
)


Merge the state of the given entity into the current persistence context.
Parameters:
entity - entity instance
Return:
the managed instance that the state was merged to
Throws:
IllegalArgumentException - if instance is not an entity or is a removed entity
TransactionRequiredException - if there is no transaction when invoked on a container-managed entity manager of that is of type PersistenceContextType.TRANSACTION
Since:
JPA 1.0