The following HQL fails trying to replace the question mark with a parameter:
from Foo
This, however, works correctly:
select IsBar from Foo
Environment
None
Activity
Jason Walker
April 19, 2012 at 5:34 PM
I bisected this issue and discovered it is an issue in the ANTLR query translator (made the default in 11b4606aee988, 3 years ago). If you don't need the ANTLR query translator, you can use the Classic translator. Of course... many features don't work with the classic translator.
Given a mapping like this:
<class name="Foo">
...
<property name="IsBar" column="`Bar?`" />
</class>
The following HQL fails trying to replace the question mark with a parameter:
from Foo
This, however, works correctly:
select IsBar from Foo