Not an Issue
Details
Details
Assignee
Alex Zaytsev
Alex ZaytsevReporter
H.M. Müller
H.M. MüllerLabels
Components
Affects versions
Priority
Who's Looking?
Open Who's Looking?
Created April 13, 2011 at 2:59 AM
Updated August 30, 2020 at 8:44 PM
Resolved August 30, 2020 at 8:44 PM
Linq's .Any operator is apparently not translated to valid HQL. In the attachment, there are two test cases for an .Any behind a ! (not) and an .Any containing || (or):
I argue that this bug is critical because
the tests do not throw an exception, i.e., one might assume that the result is correct when it is not.
Workarounds are hard - they need to rewrite the complete expression. Especially when the expressions are built algorithmically (e.g. depending on user input), this may be next to impossible.
I risk to predict that correctly translated HQL would then create wrong SQL - see issue NH-2648. Therefore, both these issues probably need to be solved at the same time.