HHH-6232 : Minor correction adding discriminator value to DiscriminatorBindingState
This commit is contained in:
parent
5df5883e31
commit
151d9ce316
|
@ -37,7 +37,6 @@ import org.hibernate.metamodel.source.hbm.xml.mapping.XMLHibernateMapping.XMLCla
|
||||||
*/
|
*/
|
||||||
public class HbmDiscriminatorBindingState extends AbstractHbmAttributeBindingState
|
public class HbmDiscriminatorBindingState extends AbstractHbmAttributeBindingState
|
||||||
implements DiscriminatorBindingState {
|
implements DiscriminatorBindingState {
|
||||||
private final XMLDiscriminator discriminator;
|
|
||||||
private final String discriminatorValue;
|
private final String discriminatorValue;
|
||||||
private final boolean isForced;
|
private final boolean isForced;
|
||||||
private final boolean isInserted;
|
private final boolean isInserted;
|
||||||
|
@ -53,10 +52,10 @@ public class HbmDiscriminatorBindingState extends AbstractHbmAttributeBindingSta
|
||||||
super(
|
super(
|
||||||
ownerClassName, defaults.getDefaultDiscriminatorColumnName(), defaults, null, null, null, true
|
ownerClassName, defaults.getDefaultDiscriminatorColumnName(), defaults, null, null, null, true
|
||||||
);
|
);
|
||||||
|
XMLDiscriminator discriminator = xmlEntityClazz.getDiscriminator();
|
||||||
this.discriminatorValue = MappingHelper.getStringValue(
|
this.discriminatorValue = MappingHelper.getStringValue(
|
||||||
xmlEntityClazz.getDiscriminatorValue(), entityName
|
xmlEntityClazz.getDiscriminatorValue(), entityName
|
||||||
);
|
);
|
||||||
this.discriminator = xmlEntityClazz.getDiscriminator();
|
|
||||||
this.isForced = xmlEntityClazz.getDiscriminator().isForce();
|
this.isForced = xmlEntityClazz.getDiscriminator().isForce();
|
||||||
this.isInserted = discriminator.isInsert();
|
this.isInserted = discriminator.isInsert();
|
||||||
this.typeName = discriminator.getType() == null ? "string" : discriminator.getType();
|
this.typeName = discriminator.getType() == null ? "string" : discriminator.getType();
|
||||||
|
@ -79,10 +78,6 @@ public class HbmDiscriminatorBindingState extends AbstractHbmAttributeBindingSta
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isInsertable() {
|
|
||||||
return discriminator.isInsert();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInserted() {
|
public boolean isInserted() {
|
||||||
return isInserted;
|
return isInserted;
|
||||||
|
|
Loading…
Reference in New Issue