-->
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: Broken filter / Where clause acess unmapped prop or ses.var
PostPosted: Mon Oct 17, 2011 10:26 am 
Newbie

Joined: Fri Oct 14, 2011 8:03 am
Posts: 1
Hi I have a temporal domain,

i.e. any entity has a validity time range.

For each table I ended up with

rowid (primary key)
entityid
start_date
end_date

where rowid is unique

and any pair (entityid,inspected_date) with inspected_date between start_date and end_date
is unique

Each class uses rowid as primary key
and a entityid with a filter to access related information in other tables.
The filter looks like ":inspected_date between start_date and end_date".

But unfortunately filters are broken in nhibernate 2.1.2, 3.0, 3.1 and 3.2.
I.e. in 3.1 it only works if you turn off lazy loading and use fetch-join, so that all Objects are populated in one big fetch.
If you allow for lazy loading, objects loaded later are queried without the filter.

I urgently need a work around.


Is there a way to make the where clause in a <class ... where="...">
access a non-mapped property or something like a session variable or an unmapped object???


Since inspected_date is constant during a session, I only need something which can be done within session range.

Any ideas?

Thanks

Andreas


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.