Hi
We use JBoss 6.1 and I think, Hibernate Core 3.6.6.Final. I made a little mistake by defining a named query. The following query passed the query validation:
Code:
<named-query name="Trade.getAllOmpReversalFromToday">
<query>SELECT t FROM Trade t
WHERE t.reversal.reversalType IN ('Mistrade', 'OnBehalf') ) <-- bracket to much
AND (DATE(t.buy.transactionTime) = CURRENT_DATE() OR DATE(t.sell.transactionTime) = CURRENT_DATE())</query>
</named-query>
The side effect is that the query strips out the date comparision and returns everything which is passes the 'IN ('Mistrade,''ObBehalf')' clause. I would expect that Hibernate throws an error saying that the named query has an error.
I am not sure, is that something you want to know or you have already fixed.
Regards,
Ralf