-->
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: HQL that test for existence of a key in a member map
PostPosted: Thu Nov 30, 2006 4:09 pm 
Newbie

Joined: Mon Oct 16, 2006 9:18 am
Posts: 4
Hi, I wonder if there is a simple HQL that will select based on the existence of a key in a member map of an object. For example, the following does not work for obvious reasons.

from MyTable myobject where 'MyKey' in elements(myobject.map)

Is there something to the effect of the following query fragment?

from MyTable myobject where exists myobject.map['MyKey']

Thanks.


Top
 Profile  
 
 Post subject: Re: HQL that test for existence of a key in a member map
PostPosted: Wed Jan 17, 2007 6:21 pm 
Newbie

Joined: Mon Aug 14, 2006 8:06 pm
Posts: 18
Location: Montréal, Québec
blahsome wrote:
from MyTable myobject where 'MyKey' in elements(myobject.map)


Have you tried the following?

Code:
from MyTable myobject where 'MyKey' in indices(myobject.map)


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.