In code [
https://github.com/apache/syncope/blob/443f5a38ea45f15c092c41abb202f897c795c5f2/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAUserDAO.java#L397]
I noticed that `entityManager().remove(merged);` is called.

What is the purpose why you do this? The transaction is rolled back and
changes are not added into database.
Maybe you need to detach the managed entity and also remove it from the L2
cache if it is enabled?
{code:java}

Regarding the L2 proposal - please, look at the issue
https://issues.apache.org/jira/browse/SYNCOPE-1386

entityManager().detach(merged);
if (entityManager().getEntityManagerFactory().getCache() != null) {
entityManager().getEntityManagerFactory().getCache().evict(JPAUser.class,
merged.getKey());
}
{code}

Reply via email to