HHH-9605: fix querying a collection of enums
(cherry picked from commit 001b841934
)
This commit is contained in:
parent
9bfceca718
commit
b48f93af71
|
@ -27,15 +27,15 @@ package org.hibernate.hql.internal.ast.tree;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import antlr.SemanticException;
|
||||
import antlr.collections.AST;
|
||||
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.hql.internal.antlr.HqlSqlTokenTypes;
|
||||
import org.hibernate.hql.internal.antlr.HqlTokenTypes;
|
||||
import org.hibernate.param.ParameterSpecification;
|
||||
import org.hibernate.type.Type;
|
||||
|
||||
import antlr.SemanticException;
|
||||
import antlr.collections.AST;
|
||||
|
||||
/**
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
|
@ -66,6 +66,14 @@ public class InLogicOperatorNode extends BinaryLogicOperatorNode implements Bina
|
|||
if ( ExpectedTypeAwareNode.class.isAssignableFrom( inListChild.getClass() ) ) {
|
||||
( (ExpectedTypeAwareNode) inListChild ).setExpectedType( lhsType );
|
||||
}
|
||||
|
||||
// fix for HHH-9605
|
||||
if ( CollectionFunction.class.isAssignableFrom( inListChild.getClass() ) &&
|
||||
ExpectedTypeAwareNode.class.isAssignableFrom( lhs.getClass() ) ) {
|
||||
lhsType = ((CollectionFunction) inListChild).getDataType();
|
||||
((ExpectedTypeAwareNode) lhs).setExpectedType( lhsType );
|
||||
}
|
||||
|
||||
inListChild = inListChild.getNextSibling();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue