Tag: persist

JPA EntityManager:为什么使用persist()over merge()?

EntityManager.merge()可以插入新的对象并更新现有的对象。 为什么要使用persist() (只能创build新的对象)?