-->
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: arbitrary where clause in mapping file
PostPosted: Wed Apr 21, 2004 2:37 pm 
Regular
Regular

Joined: Mon Nov 24, 2003 6:36 pm
Posts: 105
I'm attempting to use the "arbitrary" where clause to limit the size of some of my 1-Many collections hanging off my objects that may grow to a large size. I'm trying to add something like the following

<set name="transferHistory" inverse="true" lazy="true" cascade="all" where="LAST_UPDATED>SYSDATE-90">
<key column="vol_id"/>
<one-to-many class="edu.umich.med.mrt.entities.TransferHistory"/>
</set>


However, Hibernate seems to add the generated table alias for table on both sides of the greater than operator, resulting in sql like so:

where tablename.last_updated>tablename.sysdate-90


Hibernate 2.1.2

Thanks for any advice on this feature. I can't find any examples on this specific mapping feature, but it seems highly useful in situations where large collections are possible, but most frequent use of them is only a few items.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 21, 2004 3:35 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
yep, you need v22 branch to solve this, it has been fixed


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 21, 2004 6:39 pm 
Regular
Regular

Joined: Mon Nov 24, 2003 6:36 pm
Posts: 105
Thanks, I'll give that a try.

Have I said how great this forum/hibernate is lately?

--James


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.