From 2fd7fdaa7454a362d01a709670d6ac170753fadf Mon Sep 17 00:00:00 2001 From: mposolda Date: Wed, 18 Jun 2014 10:29:57 +0200 Subject: [PATCH] KEYCLOAK-535 Fix Keycloak with Oracle --- .../models/jpa/entities/AuthenticationProviderEntity.java | 7 ++++++- .../jpa/entities/ClientUserSessionAssociationEntity.java | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/AuthenticationProviderEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/AuthenticationProviderEntity.java index 8517ad28a3..2ce4c127a5 100644 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/AuthenticationProviderEntity.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/AuthenticationProviderEntity.java @@ -8,7 +8,9 @@ import javax.persistence.ElementCollection; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; +import javax.persistence.JoinColumn; import javax.persistence.MapKeyColumn; +import javax.persistence.Table; import org.hibernate.annotations.GenericGenerator; @@ -16,6 +18,7 @@ import org.hibernate.annotations.GenericGenerator; * @author Marek Posolda */ @Entity +@Table(name="AuthProviderEntity") public class AuthenticationProviderEntity { @Id @@ -30,7 +33,9 @@ public class AuthenticationProviderEntity { @ElementCollection @MapKeyColumn(name="name") @Column(name="value") - @CollectionTable + @CollectionTable(name="AuthProviderEntity_cfg", joinColumns = { + @JoinColumn(name = "AuthProviderEntity_id") + }) private Map config; public String getId() { diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/ClientUserSessionAssociationEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/ClientUserSessionAssociationEntity.java index 0cf75aa051..490e75d7c2 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/ClientUserSessionAssociationEntity.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/ClientUserSessionAssociationEntity.java @@ -9,12 +9,14 @@ import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; +import javax.persistence.Table; /** * @author Bill Burke * @version $Revision: 1 $ */ @Entity +@Table(name = "ClientUserSessionAscEntity") @NamedQueries({ @NamedQuery(name = "getAllClientUserSessions", query = "select s from ClientUserSessionAssociationEntity s"), @NamedQuery(name = "getClientUserSessionBySession", query = "select s from ClientUserSessionAssociationEntity s where s.session = :session"),