Removing workaround for H6 as this is now fixed
This reverts commit c74b832995759d4c9f330a4ba1767d01f9e3c174. Closes #16551
This commit is contained in:
parent
e00af7e172
commit
b508b18391
3 changed files with 1 additions and 25 deletions
|
@ -1089,9 +1089,9 @@ public class JpaRealmProvider implements RealmProvider, ClientProvider, ClientSc
|
|||
entity.setRealm(em.getReference(RealmEntity.class, realm.getId()));
|
||||
entity.setLocale(locale);
|
||||
entity.setTexts(new HashMap<>());
|
||||
em.persist(entity);
|
||||
}
|
||||
entity.getTexts().put(key, text);
|
||||
em.persist(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,10 +18,8 @@
|
|||
package org.keycloak.models.jpa.converter;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import jakarta.persistence.AttributeConverter;
|
||||
import org.hibernate.type.descriptor.java.MutableMutabilityPlan;
|
||||
import org.jboss.logging.Logger;
|
||||
import org.keycloak.util.JsonSerialization;
|
||||
|
||||
|
@ -47,19 +45,4 @@ public class MapStringConverter implements AttributeConverter<Map<String, String
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Mutability plan for this property. Needed in Hibernate 6 as it doesn't assume mutability by default
|
||||
* in contrast to Hibernate 5.
|
||||
* This is tracked in the upstream project in <a href="https://hibernate.atlassian.net/browse/HHH-16081">HHH-16081</a>
|
||||
*/
|
||||
public static class MapStringConverterMutabilityPlan extends MutableMutabilityPlan<Map<String, String>> {
|
||||
|
||||
@Override
|
||||
protected Map<String, String> deepCopyNotNull(Map<String, String> value) {
|
||||
return new HashMap<>(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ import jakarta.persistence.JoinColumn;
|
|||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Mutability;
|
||||
import org.hibernate.annotations.Nationalized;
|
||||
import org.keycloak.models.jpa.converter.MapStringConverter;
|
||||
|
||||
|
@ -85,12 +84,6 @@ public class RealmLocalizationTextsEntity {
|
|||
@Nationalized
|
||||
@Column(name = "TEXTS")
|
||||
@Convert(converter = MapStringConverter.class)
|
||||
/*
|
||||
* @Mutability annotation needed in Hibernate 6 as it doesn't assume mutability by default
|
||||
* in contrast to Hibernate 5.
|
||||
* This is tracked in the upstream project in https://hibernate.atlassian.net/browse/HHH-16081
|
||||
*/
|
||||
@Mutability(MapStringConverter.MapStringConverterMutabilityPlan.class)
|
||||
private Map<String,String> texts;
|
||||
|
||||
public Map<String,String> getTexts() {
|
||||
|
|
Loading…
Reference in a new issue