diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/RealmEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/RealmEntity.java index bf5b339577..64cb2f22a4 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/RealmEntity.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/RealmEntity.java @@ -120,7 +120,7 @@ public class RealmEntity { Collection requiredCredentials = new ArrayList(); @OneToMany(cascade ={CascadeType.REMOVE}, orphanRemoval = true) - @JoinTable(name="FED_PROVIDERS", joinColumns={ @JoinColumn(name="REALM_ID") }) + @JoinTable(name="FED_PROVIDERS", joinColumns={ @JoinColumn(name="REALM_ID") }, inverseJoinColumns={ @JoinColumn(name = "USERFEDERATIONPROVIDERS_ID") }) List userFederationProviders = new ArrayList(); @OneToMany(cascade ={CascadeType.REMOVE}, orphanRemoval = true, mappedBy = "realm") diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/RoleEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/RoleEntity.java index 437867e7e9..ddf9244a6e 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/RoleEntity.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/RoleEntity.java @@ -30,7 +30,7 @@ import java.util.Collection; public class RoleEntity { @Id - @Column(name="id", length = 36) + @Column(name="ID", length = 36) private String id; @Column(name = "NAME") diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserEntity.java index 2da1641586..5051aded7a 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserEntity.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserEntity.java @@ -77,7 +77,7 @@ public class UserEntity { @OneToMany(cascade = CascadeType.REMOVE, orphanRemoval = true, mappedBy="user") protected Collection credentials = new ArrayList(); - @Column(name="federation_link") + @Column(name="FEDERATION_LINK") protected String federationLink; @Column(name="SERVICE_ACCOUNT_CLIENT_LINK") diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserFederationProviderEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserFederationProviderEntity.java index 22370f3c88..259c9749e8 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserFederationProviderEntity.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserFederationProviderEntity.java @@ -35,7 +35,7 @@ public class UserFederationProviderEntity { @ElementCollection @MapKeyColumn(name="name") - @Column(name="value") + @Column(name="VALUE") @CollectionTable(name="USER_FEDERATION_CONFIG", joinColumns={ @JoinColumn(name="USER_FEDERATION_PROVIDER_ID") }) private Map config;