From 2c16f09195823c671dfa27300e95c5f1a6504829 Mon Sep 17 00:00:00 2001 From: Gail Badner Date: Wed, 22 Sep 2021 14:53:55 -0700 Subject: [PATCH] HHH-14840 : IBM Db2 11.1 fails on TransientOverride test cases --- .../test/inheritance/TransientOverrideAsPersistentJoined.java | 2 ++ .../inheritance/TransientOverrideAsPersistentTablePerClass.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/hibernate-core/src/test/java/org/hibernate/test/inheritance/TransientOverrideAsPersistentJoined.java b/hibernate-core/src/test/java/org/hibernate/test/inheritance/TransientOverrideAsPersistentJoined.java index 0901121872..d9942e8bc8 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/inheritance/TransientOverrideAsPersistentJoined.java +++ b/hibernate-core/src/test/java/org/hibernate/test/inheritance/TransientOverrideAsPersistentJoined.java @@ -6,6 +6,7 @@ */ package org.hibernate.test.inheritance; +import java.util.Comparator; import java.util.List; import javax.persistence.Column; import javax.persistence.ConstraintMode; @@ -85,6 +86,7 @@ public class TransientOverrideAsPersistentJoined extends BaseNonConfigCoreFuncti final List employees = session.createQuery( "from Employee", Employee.class ) .getResultList(); assertEquals( 2, employees.size() ); + employees.sort( Comparator.comparing( Employee::getName ) ); assertTrue( Editor.class.isInstance( employees.get( 0 ) ) ); assertTrue( Writer.class.isInstance( employees.get( 1 ) ) ); final Editor editor = (Editor) employees.get( 0 ); diff --git a/hibernate-core/src/test/java/org/hibernate/test/inheritance/TransientOverrideAsPersistentTablePerClass.java b/hibernate-core/src/test/java/org/hibernate/test/inheritance/TransientOverrideAsPersistentTablePerClass.java index 68cbc5d209..a06849d271 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/inheritance/TransientOverrideAsPersistentTablePerClass.java +++ b/hibernate-core/src/test/java/org/hibernate/test/inheritance/TransientOverrideAsPersistentTablePerClass.java @@ -6,6 +6,7 @@ */ package org.hibernate.test.inheritance; +import java.util.Comparator; import java.util.List; import javax.persistence.Column; import javax.persistence.ConstraintMode; @@ -84,6 +85,7 @@ public class TransientOverrideAsPersistentTablePerClass extends BaseNonConfigCor final List employees = session.createQuery( "from Employee", Employee.class ) .getResultList(); assertEquals( 2, employees.size() ); + employees.sort( Comparator.comparing( Employee::getName ) ); assertTrue( Editor.class.isInstance( employees.get( 0 ) ) ); assertTrue( Writer.class.isInstance( employees.get( 1 ) ) ); final Editor editor = (Editor) employees.get( 0 );