SQL mode ONLY_FULL_GROUP_BY is enabled by default. So instead of disabling ONLY_FULL_GROUP_BY I am trying to use ANY_VALUE(arg)
The query fetches me the expected result.
I want this to be used with Spring Boot CrudRepository. So I had it on the @Query annotation something like below (just a sample). I want to use @Query annotation with a complex query
@Query("select any_value(c.id), c.number, any_value(c.type) from Call c group by c.number")
public List<Call> getCallsByType(Pageable pageable);
But it throws an exception
Caused by: java.lang.IllegalStateException: No data type for node: org.hibernate.hql.internal.ast.tree.MethodNode
+-[METHOD_CALL] MethodNode: '('
| +-[METHOD_NAME] IdentNode: 'any_value' {originalText=any_value}
| \-[EXPR_LIST] SqlNode: 'exprList'
How can it be done?