Class primitiveType = ClassUtils.getWrapperTypeForPrimitiveType(clr.classForName(elementType));
if (!clr.isAssignableFrom(elementType, filteredElementType) &&
!clr.isAssignableFrom(filteredElementType, elementType) &&
(primitiveType !=null && clr.isAssignableFrom(elementType,primitiveType.getName())))
{
throw new IncompatibleQueryElementTypeException(elementType, filteredElementType.getName());
}
LogicSetExpression ownTblExpr = stmt.newTableExpression(containerTable, listTableAlias);
ScalarExpression ownerExpr = ownerMapping.newScalarExpression(stmt, ownerTe);
ScalarExpression ownerSetExpr = this.ownerMapping.newScalarExpression(stmt, stmt.getTableExpression(listTableAlias));