Fix select child of joinsubclass inheritance
This commit is contained in:
parent
b06be7ff6d
commit
3ba826e1c8
|
@ -1236,20 +1236,23 @@ public class JoinedSubclassEntityPersister extends AbstractEntityPersister {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EntityDiscriminatorMapping getDiscriminatorMapping(TableGroup tableGroup) {
|
public EntityDiscriminatorMapping getDiscriminatorMapping(TableGroup tableGroup) {
|
||||||
if ( explicitDiscriminatorColumnName == null ) {
|
if(hasSubclasses()) {
|
||||||
CaseSearchedExpressionInfo info = getCaseSearchedExpression( tableGroup );
|
if ( explicitDiscriminatorColumnName == null ) {
|
||||||
return new JoinedSubclassDiscriminatorMappingImpl(
|
CaseSearchedExpressionInfo info = getCaseSearchedExpression( tableGroup );
|
||||||
this,
|
return new JoinedSubclassDiscriminatorMappingImpl(
|
||||||
getRootTableName(),
|
this,
|
||||||
getDiscriminatorColumnName(),
|
getRootTableName(),
|
||||||
info.caseSearchedExpression,
|
getDiscriminatorColumnName(),
|
||||||
info.columnReferences,
|
info.caseSearchedExpression,
|
||||||
(BasicType) getDiscriminatorType()
|
info.columnReferences,
|
||||||
);
|
(BasicType) getDiscriminatorType()
|
||||||
}
|
);
|
||||||
else {
|
}
|
||||||
return super.getDiscriminatorMapping( tableGroup );
|
else {
|
||||||
|
return super.getDiscriminatorMapping( tableGroup );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue