Revert "Fix problem when Hibernate on MySQL is confused to read back Enums from VARCHARs"

This doesn't work with Hibernate 6.2.0.Final any more, and it is no longer needed after changing the VARCHAR to TINYINT for the enums

This reverts commit 0d96b8db6b9f8cefc2997d350cc6359c01cd61be.
This commit is contained in:
Alexander Schwartz 2023-03-31 10:56:22 +02:00 committed by Václav Muzikář
parent 143a3bc7ac
commit f345c8b931
2 changed files with 0 additions and 7 deletions

View file

@ -41,9 +41,7 @@ import jakarta.persistence.UniqueConstraint;
import org.hibernate.annotations.BatchSize; import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Fetch; import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode; import org.hibernate.annotations.FetchMode;
import org.hibernate.annotations.JdbcType;
import org.hibernate.annotations.Nationalized; import org.hibernate.annotations.Nationalized;
import org.hibernate.type.descriptor.jdbc.VarcharJdbcType;
import org.keycloak.representations.idm.authorization.DecisionStrategy; import org.keycloak.representations.idm.authorization.DecisionStrategy;
import org.keycloak.representations.idm.authorization.Logic; import org.keycloak.representations.idm.authorization.Logic;
@ -88,11 +86,9 @@ public class PolicyEntity {
private String type; private String type;
@Column(name = "DECISION_STRATEGY") @Column(name = "DECISION_STRATEGY")
@JdbcType(VarcharJdbcType.class)
private DecisionStrategy decisionStrategy = DecisionStrategy.UNANIMOUS; private DecisionStrategy decisionStrategy = DecisionStrategy.UNANIMOUS;
@Column(name = "LOGIC") @Column(name = "LOGIC")
@JdbcType(VarcharJdbcType.class)
private Logic logic = Logic.POSITIVE; private Logic logic = Logic.POSITIVE;
@ElementCollection(fetch = FetchType.LAZY) @ElementCollection(fetch = FetchType.LAZY)

View file

@ -18,8 +18,6 @@
package org.keycloak.authorization.jpa.entities; package org.keycloak.authorization.jpa.entities;
import org.hibernate.annotations.JdbcType;
import org.hibernate.type.descriptor.jdbc.VarcharJdbcType;
import org.keycloak.representations.idm.authorization.DecisionStrategy; import org.keycloak.representations.idm.authorization.DecisionStrategy;
import org.keycloak.representations.idm.authorization.PolicyEnforcementMode; import org.keycloak.representations.idm.authorization.PolicyEnforcementMode;
@ -43,7 +41,6 @@ public class ResourceServerEntity {
private boolean allowRemoteResourceManagement; private boolean allowRemoteResourceManagement;
@Column(name = "POLICY_ENFORCE_MODE") @Column(name = "POLICY_ENFORCE_MODE")
@JdbcType(VarcharJdbcType.class)
private PolicyEnforcementMode policyEnforcementMode = PolicyEnforcementMode.ENFORCING; private PolicyEnforcementMode policyEnforcementMode = PolicyEnforcementMode.ENFORCING;
@Column(name = "DECISION_STRATEGY") @Column(name = "DECISION_STRATEGY")