HHH-7744 @DiscriminatorColumn's default discriminatorType ignored
This commit is contained in:
parent
367d331fd7
commit
d271ad7e6a
|
@ -222,10 +222,9 @@ public class RootEntityClass extends EntityClass {
|
|||
discriminatorColumnValues = new Column( null ); //(stliu) give null here, will populate values below
|
||||
discriminatorColumnValues.setNullable( false ); // discriminator column cannot be null
|
||||
if ( discriminatorColumnAnnotation != null ) {
|
||||
|
||||
DiscriminatorType discriminatorType = Enum.valueOf(
|
||||
DiscriminatorType.class, discriminatorColumnAnnotation.value( "discriminatorType" ).asEnum()
|
||||
);
|
||||
DiscriminatorType discriminatorType = JandexHelper.getValue(
|
||||
discriminatorColumnAnnotation,
|
||||
"discriminatorType", DiscriminatorType.class );
|
||||
switch ( discriminatorType ) {
|
||||
case STRING: {
|
||||
type = String.class;
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
*/
|
||||
package org.hibernate.test.annotations.id;
|
||||
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.Transaction;
|
||||
|
@ -46,17 +47,13 @@ import org.hibernate.test.annotations.id.entities.SoundSystem;
|
|||
import org.hibernate.test.annotations.id.entities.Store;
|
||||
import org.hibernate.test.annotations.id.entities.Tree;
|
||||
import org.hibernate.test.util.SchemaUtil;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Bernard
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public class IdTest extends BaseCoreFunctionalTestCase {
|
||||
@Test
|
||||
public void testGenericGenerator() throws Exception {
|
||||
|
|
|
@ -10,7 +10,7 @@ import javax.persistence.IdClass;
|
|||
*/
|
||||
@Entity
|
||||
@IdClass(FootballerPk.class)
|
||||
@DiscriminatorColumn(name = "bibi")
|
||||
@DiscriminatorColumn( name = "bibi", length = 53 )
|
||||
public class Footballer {
|
||||
private String firstname;
|
||||
private String lastname;
|
||||
|
|
Loading…
Reference in New Issue