Hello!
After resolving my first problem that I posted yesterday I thought of putting some "order" in the filters I have. So I decided to name them with the same logic I have for NamedQueries, hence className.filterName. I ended up having a filter definition as follows:
Code:
@FilterDef(
name = "className.myLongFilterName", parameters=@ParamDef( name="param", type="type" )
)
This gives a NullPointerException in line 492 of org.hibernate.engine.spi.QueryParameters.processFilters.
I traced through the source code and noticed that such a filter name gets "split" into two parts on the "." and only the first part is taken as filter name.
So when I assign the parameter, it works properly and I can inspect the filter and see it actually holds the right value for className.myLongFilterName but then processFilters() crashes looking for a filter named just className (which does not exist). To fix it I had to change the filter definition into:
Code:
@FilterDef(
name = "myLongFilterName", parameters=@ParamDef( name="param", type="type" )
)
Is this intended behaviour and my fault for missing something from the documentation?
Thanks!
Stefano