eclipselink merge() without initial SELECT
问题 I am trying to perform a merge(entity) using eclipselink, and I would like to indicate to eclipse if that will be an update or insert, so it does not have to perform the initial select query. Thanks to the progress made in this question, I have the following: UnitOfWorkImpl uow = (UnitOfWorkImpl) ((EntityManagerImpl) em.getDelegate()).getUnitOfWork(); if (dbObj.isInDB()) { uow.updateObject(dbObj); } else { uow.insertObject(dbObj); } However, i get the following: org.eclipse.persistence