我试图在命名查询中调用一个函数,但我得到:
java.lang.IllegalStateException: No data type for node: org.hibernate.hql.ast.tree.MethodNode
\-[METHOD_CALL] MethodNode: '('
+-[METHOD_NAME] IdentNode: 'MYFUNCTION' {originalText=MYFUNCTION}
\-[EXPR_LIST] SqlNode: 'exprList'
\-[NUM_INT] LiteralNode: '1'
我的查询类似于
@NamedQuery(name = "myQuery",
query = " select r, MYFUNCTION(r.id) from ResPO r "
+ " where r.status like 'A'")
如果我简化查询,一切正常:
@NamedQuery(name = "myQuery",
query = " select r from ResPO r "
+ " where r.status like 'A'")
错误是什么?谢谢++