-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Enable filter without the where clause
PostPosted: Wed Apr 28, 2010 2:28 am 
Newbie

Joined: Fri Aug 24, 2007 10:11 am
Posts: 5
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.