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.
|