-->
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.  [ 2 posts ] 
Author Message
 Post subject: Query an associated map with Criteria API
PostPosted: Fri Aug 08, 2008 6:22 am 
Newbie

Joined: Thu Nov 30, 2006 10:06 am
Posts: 9
Is it ever possible to query for a map key with Criteria API? HQL manages it quite well, e.g.

Code:
from User where contacts['email'] = 'me@localhost'


but Criteria API warns you that it cannot find a property if you try to add smth like: Restrictions.eq("contacts['email']","me@localhost").

The mapping is:
Code:
<class name="User">
...
<map name="contacts" ...>
...
</map>
</class>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 08, 2008 4:30 pm 
Regular
Regular

Joined: Mon Jan 22, 2007 10:32 am
Posts: 101
As far as I know, such query is not possible through criteria api.

_________________
Please rate this post if you find it helpful


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.