No that's not working!
If i use two filters for example:
Code:
<class>
...
<filter name="filter1" condition=":filterParam = id"/>
<filter name="filter2" condition=":filterParam = id"/>
</class>
<filter-def name="filter1">
<filter-param name="filterParam" type="int"/>
</filter-def>
<filter-def name="filter2">
<filter-param name="filterParam" type="int"/>
</filter-def>
and enable both within my application code:
Code:
session.enableFilter("filter1").setParameter("filterParam", 1);
session.enableFilter("filter2").setParameter("filterParam", 2);
The generated SQL Where conditions are chained using AND.
But i need OR!