There are some restrictions to jpql in the EJB 3.0 persistence specification
for the query language that disallow some things that will work on some
databases. As a result, JPQL validation will disallow writing queries that
could provide correct results on certain databases.
An example is: IN
From the spec:
state_field_path_expression [NOT] IN ( in_item
* | subquery)
in_item ::= literal | input_parameter
The state_field_path_expression must have a string, numeric, or enum value
On an Oracle database IN can be used with Dates. With a hint to disable
validation, it would be possible to write a JPQL query that would correctly
return values that used an IN with a Date.