From 18d6a993b28b1d005f185211fdb73567509a2702 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Thu, 12 Dec 2024 20:29:13 +0100 Subject: [PATCH] HHH-18929 fix a test that looks wrong --- .../test/boot/models/xml/complete/DiscriminatorValueTest.java | 4 ++-- .../mappings/models/complete/discriminator-value.xml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/boot/models/xml/complete/DiscriminatorValueTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/boot/models/xml/complete/DiscriminatorValueTest.java index 09d1974387..62150ccf5c 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/boot/models/xml/complete/DiscriminatorValueTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/boot/models/xml/complete/DiscriminatorValueTest.java @@ -39,14 +39,14 @@ public class DiscriminatorValueTest { { final ClassDetails rootClassDetails = classDetailsRegistry.getClassDetails( Root.class.getName() ); - assertThat( rootClassDetails.hasDirectAnnotationUsage( DiscriminatorValue.class ) ).isFalse(); + assertThat( rootClassDetails.hasDirectAnnotationUsage( DiscriminatorValue.class ) ).isTrue(); assertThat( rootClassDetails.hasDirectAnnotationUsage( DiscriminatorFormula.class ) ).isFalse(); final DiscriminatorColumn discriminatorColumn = rootClassDetails.getDirectAnnotationUsage( DiscriminatorColumn.class ); assertThat( discriminatorColumn ).isNotNull(); assertThat( discriminatorColumn.name() ).isEqualTo( "TYPE_COLUMN" ); - assertThat( discriminatorColumn.discriminatorType() ).isEqualTo( DiscriminatorType.INTEGER ); + assertThat( discriminatorColumn.discriminatorType() ).isEqualTo( DiscriminatorType.CHAR ); final ClassDetails subClassDetails = classDetailsRegistry.getClassDetails( Sub.class.getName() ); assertThat( subClassDetails.hasDirectAnnotationUsage( DiscriminatorColumn.class ) ).isFalse(); diff --git a/hibernate-core/src/test/resources/mappings/models/complete/discriminator-value.xml b/hibernate-core/src/test/resources/mappings/models/complete/discriminator-value.xml index de9582c6f5..af890efd22 100644 --- a/hibernate-core/src/test/resources/mappings/models/complete/discriminator-value.xml +++ b/hibernate-core/src/test/resources/mappings/models/complete/discriminator-value.xml @@ -11,7 +11,8 @@ - + P +