1

Hibernate has a special "class" property. How to refer it in QueryDSL?

What I generally need is to group results by the entity type. It is possible to do it in HQL.

1

1 Answer 1

0

You can't use the Hibernate class property, but the JPA type expression instead, via JPAExpressions.type(entity).

2
  • it doesn't work with grouping in QueryDSL: Unsupported expression unknown operation with operator com.mysema.query.jpa.JPQLOps#TYPE and args [sourceTable] Jun 4, 2015 at 10:13
  • Which Querydsl version do you use? And could you provide the full stacktrace? Jun 8, 2015 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.