Detach an entity from JPA/EJB3 persistence context

后端 未结 14 2129
面向向阳花
面向向阳花 2020-12-13 03:26

What would be the easiest way to detach a specific JPA Entity Bean that was acquired through an EntityManager. Alternatively, could I have a query return detached objects in

14条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-13 04:23

    No matter which JPA implementation you use, Just use entityManager.detach(object) it's now in JPA 2.0 and part of JEE6.

提交回复
热议问题