I'm using the JPA EntityManager + Hiberate, and a myserious piece of the where clause is appearing. The debug from Hibernate is basically showing:
select /* bunch of columns */
from some_table
where /* several filters */
and 0=1
This is happening when running javax.persistence.Query.getResultList
. The Query
has an array of Predicates
in its where clause, but rest assured that 0 = 1
is not one of them.
I can find no possible reason why the 0=1
part is included in the query. Any ideas? I'd search for an answer first, but search engines ignore =
.