My model has three entities:
Taxi
shift : Shift
Driver
taxi : Taxi
Shift
shiftsPerDay : int
The following query in JPQL works fine:
however if I try to use the JPA criteria API:
it results in invalid JPQL:
whereas this would be correct (note "select(count(...))" instead of "count(select ...)"):
To reproduce: