HHH-12565 Fix that returns the discriminator constant instead of column reference for leaf subtypes
This commit is contained in:
parent
f972dd4d29
commit
f62cecc62b
|
@ -338,7 +338,11 @@ public abstract class AbstractEntityPersister
|
|||
}
|
||||
|
||||
public String getDiscriminatorColumnReaderTemplate() {
|
||||
return Template.TEMPLATE + "." + DISCRIMINATOR_ALIAS;
|
||||
if ( getEntityMetamodel().getSubclassEntityNames().size() == 1 ) {
|
||||
return getDiscriminatorSQLValue();
|
||||
} else {
|
||||
return Template.TEMPLATE + "." + DISCRIMINATOR_ALIAS;
|
||||
}
|
||||
}
|
||||
|
||||
protected String getDiscriminatorAlias() {
|
||||
|
|
Loading…
Reference in New Issue