The MySQL string concatenation function "concat_ws" is not supported by Hibernate, although the MySQLDialect.java class lists its sister function "concat" :
registerFunction("concat", new StandardSQLFunction("concat", StandardBasicTypes.STRING));
While executing some request beginning with SELECT CONCAT_WS(...) FROM ...
the following exception is thrown:
Caused by: java.lang.IllegalStateException: No data type for node: org.hibernate.hql.ast.tree.MethodNode
-[METHOD_CALL] MethodNode: '('
+-[METHOD_NAME] IdentNode: 'CONCAT_WS'
-[EXPR_LIST] SqlNode: 'exprList'
...
Note: this function was NOT introduced in MySQL 5.x - see MySQL doc: http://dev.mysql.com/doc/refman/4.1/en/string-functions.html#function_concat-ws
|