| I get following error when trying to use Criteria with filtering on custom user type with applied filter:
There is a bug in QueryParameters.processFilters:
if ( type.isComponentType() ) {
int paramIndex = 1;
final int numberOfParametersCoveredBy = getNumberOfParametersCoveredBy( ((ComponentType) type).getSubtypes() );
while ( paramIndex < numberOfParametersCoveredBy ) {
final String nextToken = tokens.nextToken();
if ( "?".equals( nextToken ) ) {
paramIndex++;
}
result.append( nextToken );
}
}
It use Type.isComponentType to check whether the type is a composite type, but then the type is casted to ComponentType. According to javadocs Type.isComponentType returns true for CompositeType as well. This is likely regression from HHH-10991 Closed |