HHH-18929 fix a test that looks wrong
This commit is contained in:
parent
3f92cfb98e
commit
18d6a993b2
|
@ -39,14 +39,14 @@ public class DiscriminatorValueTest {
|
||||||
|
|
||||||
{
|
{
|
||||||
final ClassDetails rootClassDetails = classDetailsRegistry.getClassDetails( Root.class.getName() );
|
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();
|
assertThat( rootClassDetails.hasDirectAnnotationUsage( DiscriminatorFormula.class ) ).isFalse();
|
||||||
|
|
||||||
final DiscriminatorColumn discriminatorColumn = rootClassDetails.getDirectAnnotationUsage(
|
final DiscriminatorColumn discriminatorColumn = rootClassDetails.getDirectAnnotationUsage(
|
||||||
DiscriminatorColumn.class );
|
DiscriminatorColumn.class );
|
||||||
assertThat( discriminatorColumn ).isNotNull();
|
assertThat( discriminatorColumn ).isNotNull();
|
||||||
assertThat( discriminatorColumn.name() ).isEqualTo( "TYPE_COLUMN" );
|
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() );
|
final ClassDetails subClassDetails = classDetailsRegistry.getClassDetails( Sub.class.getName() );
|
||||||
assertThat( subClassDetails.hasDirectAnnotationUsage( DiscriminatorColumn.class ) ).isFalse();
|
assertThat( subClassDetails.hasDirectAnnotationUsage( DiscriminatorColumn.class ) ).isFalse();
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
|
|
||||||
<entity class="Root" metadata-complete="true" access="FIELD">
|
<entity class="Root" metadata-complete="true" access="FIELD">
|
||||||
<inheritance strategy="JOINED"/>
|
<inheritance strategy="JOINED"/>
|
||||||
<discriminator-column name="TYPE_COLUMN" discriminator-type="INTEGER"/>
|
<discriminator-value>P</discriminator-value>
|
||||||
|
<discriminator-column name="TYPE_COLUMN" discriminator-type="CHAR"/>
|
||||||
<attributes>
|
<attributes>
|
||||||
<id name="id">
|
<id name="id">
|
||||||
<column name="pk"/>
|
<column name="pk"/>
|
||||||
|
|
Loading…
Reference in New Issue