KEYCLOAK-5405 add synchronization of the persistence context when creating a group

This commit is contained in:
vramik 2017-09-05 14:34:43 +02:00
parent bb9a1335ec
commit 37479a9afe

View file

@ -418,6 +418,7 @@ public class JpaRealmProvider implements RealmProvider {
RealmEntity realmEntity = em.getReference(RealmEntity.class, realm.getId());
groupEntity.setRealm(realmEntity);
em.persist(groupEntity);
em.flush();
realmEntity.getGroups().add(groupEntity);
GroupAdapter adapter = new GroupAdapter(realm, em, groupEntity);