Joined inheritance work - Removed columnExpression field from CaseSearchedExpression
This commit is contained in:
parent
59e4552195
commit
fccaca8391
|
@ -1260,8 +1260,6 @@ public class JoinedSubclassEntityPersister extends AbstractEntityPersister {
|
||||||
final BasicType discriminatorType = (BasicType) getDiscriminatorType();
|
final BasicType discriminatorType = (BasicType) getDiscriminatorType();
|
||||||
final CaseSearchedExpression caseSearchedExpression = new CaseSearchedExpression( discriminatorType );
|
final CaseSearchedExpression caseSearchedExpression = new CaseSearchedExpression( discriminatorType );
|
||||||
|
|
||||||
caseSearchedExpression.setColumnExpression( getDiscriminatorColumnName() );
|
|
||||||
|
|
||||||
tableReferenceJoins.forEach(
|
tableReferenceJoins.forEach(
|
||||||
tableReferenceJoin -> {
|
tableReferenceJoin -> {
|
||||||
final TableReference joinedTableReference = tableReferenceJoin.getJoinedTableReference();
|
final TableReference joinedTableReference = tableReferenceJoin.getJoinedTableReference();
|
||||||
|
|
|
@ -36,11 +36,5 @@ public class ANSICaseExpressionWalker implements CaseExpressionWalker {
|
||||||
}
|
}
|
||||||
|
|
||||||
sqlBuffer.append( " end" );
|
sqlBuffer.append( " end" );
|
||||||
|
|
||||||
final String columnExpression = caseSearchedExpression.getColumnExpression();
|
|
||||||
|
|
||||||
if ( columnExpression != null ) {
|
|
||||||
sqlBuffer.append( " as " ).append( columnExpression );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,11 +49,5 @@ public class DecodeCaseExpressionWalker implements CaseExpressionWalker {
|
||||||
}
|
}
|
||||||
|
|
||||||
sqlBuffer.append( ')' );
|
sqlBuffer.append( ')' );
|
||||||
|
|
||||||
final String columnExpression = caseSearchedExpression.getColumnExpression();
|
|
||||||
|
|
||||||
if ( columnExpression != null ) {
|
|
||||||
sqlBuffer.append( " as " ).append( columnExpression );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,11 +51,5 @@ public class DerbyCaseExpressionWalker implements CaseExpressionWalker {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sqlBuffer.append( " end" );
|
sqlBuffer.append( " end" );
|
||||||
|
|
||||||
final String columnExpression = caseSearchedExpression.getColumnExpression();
|
|
||||||
|
|
||||||
if ( columnExpression != null ) {
|
|
||||||
sqlBuffer.append( " as " ).append( columnExpression );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,11 +39,5 @@ public class MckoiCaseExpressionWalker implements CaseExpressionWalker {
|
||||||
sqlBuffer.append( "null" );
|
sqlBuffer.append( "null" );
|
||||||
}
|
}
|
||||||
sqlBuffer.append(buf2);
|
sqlBuffer.append(buf2);
|
||||||
|
|
||||||
final String columnExpression = caseSearchedExpression.getColumnExpression();
|
|
||||||
|
|
||||||
if ( columnExpression != null ) {
|
|
||||||
sqlBuffer.append( " as " ).append( columnExpression );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,20 +31,11 @@ public class CaseSearchedExpression implements Expression, DomainResultProducer
|
||||||
|
|
||||||
private List<WhenFragment> whenFragments = new ArrayList<>();
|
private List<WhenFragment> whenFragments = new ArrayList<>();
|
||||||
private Expression otherwise;
|
private Expression otherwise;
|
||||||
private String columnExpression;
|
|
||||||
|
|
||||||
public CaseSearchedExpression(MappingModelExpressable type) {
|
public CaseSearchedExpression(MappingModelExpressable type) {
|
||||||
this.type = (BasicType) type;
|
this.type = (BasicType) type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setColumnExpression(String columnExpression) {
|
|
||||||
this.columnExpression = columnExpression;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getColumnExpression(){
|
|
||||||
return columnExpression;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<WhenFragment> getWhenFragments() {
|
public List<WhenFragment> getWhenFragments() {
|
||||||
return whenFragments;
|
return whenFragments;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue