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: Filtering of Map
PostPosted: Tue Apr 20, 2004 9:27 pm 
Newbie

Joined: Tue Apr 20, 2004 9:03 pm
Posts: 1
Greetings!

Is it possible to filter a property of the type Map?

I have the following case (classical):

There are two classes Company and Person. These classes are associated using Temporal Property pattern (also known as Historical Mapping). Effectively, class Person has a property of type Map where the key is a Date when the employment has started and the value is the Company that employed Person.

This assosication was mapped as follows

<map name="companies" table="company_perosn_xref" lazy="true" order-by="change_date" access="field">
<key column="person_id"/>
<index column="change_date" type="date"/>
<many-to-many class="domain.Company" column="company_id"/>
</map>

Because, historically there can be hundreds of records I would like to be able to filter them. So there can be a question "What companies have employed Person since 2002-03-01?".

Idealy, I would like to use something like
Session.filter(Person.getCompanies(), "keyOfMapAsDate >= ?", ..., ...)
resulting in filtering of the Map property Person.companies.

Thanx a lot.


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.