Resolve JavaTypeDescriptor, if not explicitly specified, for StandardRowReader
This commit is contained in:
parent
9591bbb185
commit
711fb53505
|
@ -90,6 +90,15 @@ public class DynamicResultBuilderBasicStandard implements DynamicResultBuilderBa
|
||||||
basicType = jdbcResultsMetadata.resolveType( jdbcPosition, explicitJavaTypeDescriptor );
|
basicType = jdbcResultsMetadata.resolveType( jdbcPosition, explicitJavaTypeDescriptor );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final JavaTypeDescriptor<?> javaTypeDescriptor;
|
||||||
|
|
||||||
|
if ( explicitJavaTypeDescriptor != null ) {
|
||||||
|
javaTypeDescriptor = explicitJavaTypeDescriptor;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
javaTypeDescriptor = basicType.getJavaTypeDescriptor();
|
||||||
|
}
|
||||||
|
|
||||||
final SqlExpressionResolver sqlExpressionResolver = domainResultCreationState.getSqlAstCreationState().getSqlExpressionResolver();
|
final SqlExpressionResolver sqlExpressionResolver = domainResultCreationState.getSqlAstCreationState().getSqlExpressionResolver();
|
||||||
sqlExpressionResolver.resolveSqlSelection(
|
sqlExpressionResolver.resolveSqlSelection(
|
||||||
sqlExpressionResolver.resolveSqlExpression(
|
sqlExpressionResolver.resolveSqlExpression(
|
||||||
|
@ -100,7 +109,10 @@ public class DynamicResultBuilderBasicStandard implements DynamicResultBuilderBa
|
||||||
sessionFactory.getTypeConfiguration()
|
sessionFactory.getTypeConfiguration()
|
||||||
);
|
);
|
||||||
|
|
||||||
return new BasicResult<>( valuesArrayPosition, resultAlias, explicitJavaTypeDescriptor );
|
// StandardRowReader expects there to be a JavaTypeDescriptor as part of the ResultAssembler.
|
||||||
|
assert javaTypeDescriptor != null;
|
||||||
|
|
||||||
|
return new BasicResult<>( valuesArrayPosition, resultAlias, javaTypeDescriptor );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue