0

Would you know how to use the postgres crosstab (tablefunc) function in a HQL query? Do you need to register the function with Hibernate?

This is the error I'm getting:

unexpected token: CROSSTAB near line 1, column 34 [SELECT * from CROSSTAB('select ... 

Thanks.

giorgioca
  • 713
  • 1
  • 8
  • 21

1 Answers1

0

You cannot do this in HQL, since HQL is a different language which is independent of database implementations. If you want to use features specific to PostgreSQL (such as crosstab) you will need the native query interface.

Ludovico Fischer
  • 1,602
  • 11
  • 11