JPA Version column isn't updating after merge() -
i'm updating entity via entitymanager#merge()
new jpa version number jpa isn't being reflected correctly in returned entity.
@stateless @transactionattribute(transactionattributetype.required) public class leadservice { @persistencecontext(name = "joose") private entitymanager em; public lead createorupdatelead(lead lead) { if (lead.getid() != null) { em.merge(lead); } else { em.persist(lead); } return lead; }
how should deal this? thanks!
Comments
Post a Comment