Hi,
I'm using nHibernate 2.1.0 with Oracle 10g R2. I have defined the following filter in an HBM file:
<filter-def name="StorageIdentifierFilter"> <filter-param name="StorageIdentifierId" type="int" /> </filter-def>
Then I use this filter to restrict a many-to-one collection
<bag name="SortingSidValues" cascade="none" access="nosetter.camelcase" lazy="true" inverse="true" where="VALUE_DISCRIMINATOR=2"> <key column="ENTITY_ID"/> <one-to-many class="SidValue, BusinessObjects" /> <filter name="StorageIdentifierFilter" condition="(select s.SID_ID from WMS_PRODUCT_SID s where s.PRODUCT_SID_ID = PRODUCT_SID_ID) = :StorageIdentifierId "/> </bag>
When I enable the filter, I see that nHibernate adds outer join with the specified condition, but also WHERE clause. This WHERE clause restricts also my main entity.
Is it possible to disable the WHERE clause somehow and use just the OUTER JOIN as a filter?
Thanks in advance.
|