diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java index d1af307d6b..4fa08de124 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java @@ -5411,7 +5411,7 @@ public abstract class AbstractEntityPersister @Override public Object getIdentifier(Object entity, SharedSessionContractImplementor session) { - return (Serializable) identifierMapping.getPropertyAccess().getGetter().get( entity ); + return identifierMapping.getPropertyAccess().getGetter().get( entity ); } @Override diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/sql/exec/manytoone/EntityWithManyToOneJoinTableTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/exec/manytoone/EntityWithManyToOneJoinTableTest.java index dda4b30462..442b6f2685 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/sql/exec/manytoone/EntityWithManyToOneJoinTableTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/sql/exec/manytoone/EntityWithManyToOneJoinTableTest.java @@ -47,7 +47,7 @@ public class EntityWithManyToOneJoinTableTest { // } @Test - @FailureExpected +// @FailureExpected public void testSave(SessionFactoryScope scope) { EntityWithManyToOneJoinTable entity = new EntityWithManyToOneJoinTable( 1, "first", Integer.MAX_VALUE );