Workaround to avoid replacing element collections

Relates to #19162
This commit is contained in:
Alexander Schwartz 2023-03-27 13:49:02 +02:00 committed by Václav Muzikář
parent 2762e17dc0
commit b68a5be38d

View file

@ -145,7 +145,16 @@ public class ResourceEntity {
}
public void setUris(Set<String> uris) {
this.uris = uris;
// Workaround to avoid a problem in Hibernate 6.2.CR3: https://hibernate.atlassian.net/browse/HHH-16337
// Tracked via GitHub issue: https://github.com/keycloak/keycloak/issues/19162
if (this.uris != null) {
this.uris.clear();
if (uris != null) {
this.uris.addAll(uris);
}
} else {
this.uris = uris;
}
}
public String getType() {