From b8b0ecc419b0d5a129a7e6b7779ca41effcd754f Mon Sep 17 00:00:00 2001 From: mposolda Date: Mon, 23 Mar 2015 17:35:41 +0100 Subject: [PATCH] KEYCLOAK-1106 Incorrect table mapping (realm_application) --- .../resources/META-INF/jpa-changelog-1.2.0.Beta1.xml | 12 ++++++++++++ .../keycloak/models/jpa/entities/RealmEntity.java | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-1.2.0.Beta1.xml b/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-1.2.0.Beta1.xml index abdff0bc3b..a97473d77a 100755 --- a/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-1.2.0.Beta1.xml +++ b/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-1.2.0.Beta1.xml @@ -141,5 +141,17 @@ + + + + + + + + + + + + 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 81d21d5363..9fbf077855 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 @@ -104,7 +104,7 @@ public class RealmEntity { List userFederationProviders = new ArrayList(); @OneToMany(fetch = FetchType.LAZY, cascade ={CascadeType.REMOVE}, orphanRemoval = true) - @JoinTable(name="REALM_APPLICATION", joinColumns={ @JoinColumn(name="APPLICATION_ID") }, inverseJoinColumns={ @JoinColumn(name="REALM_ID") }) + @JoinTable(name="REALM_APPLICATION", joinColumns={ @JoinColumn(name="REALM_ID") }, inverseJoinColumns={ @JoinColumn(name="APPLICATION_ID") }) Collection applications = new ArrayList(); @OneToMany(fetch = FetchType.LAZY, cascade ={CascadeType.REMOVE}, orphanRemoval = true, mappedBy = "realm")