-->
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.  [ 3 posts ] 
Author Message
 Post subject: Possible to ignore Mapping where parameter
PostPosted: Wed Oct 27, 2004 5:51 am 
Regular
Regular

Joined: Tue Jan 27, 2004 12:22 pm
Posts: 103
Hello,

In my Mapping file I have this:
Code:
<set name="ranges" table="ranges" order-by="TIME_OF_CREATION desc" where="current > 0">
<key column="customerid"/>
<one-to-many class="Range"/>
</set>


Now I have a query where I want to ignore the where attribute, so it should take all ranges. My query looks like this:
Code:
String hql = "from Customer as customer " +
   "inner join customer.ranges as r " +
   "Where r.from < :ordernumber " +
   "And r.till > :ordernumber";

Now it doesn't return any results because current =0 for all ranges.
Is it possible to create a query ignoring the where=
attribute?

Thanks for helping!

_________________
Dencel
- The sun has never seen a shadow -


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 27, 2004 5:58 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Looks like something for dynamic filters in H3


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 27, 2004 6:07 am 
Regular
Regular

Joined: Tue Jan 27, 2004 12:22 pm
Posts: 103
Sorry,

I am working on the stable 2.x version of Hibernate.
I will certain take a look at the dynamic filters for H3.

But for now, is there a solution for it in 2.x? Or should I write a native query for it ?

Thanks.

_________________
Dencel
- The sun has never seen a shadow -


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

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.