-->
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: how to find if a map has a certain value
PostPosted: Tue Nov 16, 2004 10:20 pm 
Beginner
Beginner

Joined: Mon Nov 15, 2004 8:32 pm
Posts: 36
Hi,
I am quite new to HQL so this problem may have some easy solution already. I know you can use elements function to find out if a collection contains a certain element (e.g. from Category c where :item in elements(c.items), to quote an example in Hibernate in Action). Is there a similar function for map? For example can you write the following HQL:

from Catetory c where :item in values(c.itemMap)

I can't find a way to write a HQL to do it (except write a SQL query) since I don't know how to get the "values" of a map.
Does anybody know how to solve this problem?

Thanks,
--Jiunjiun


[b]Hibernate version:[/b]
2.1.4

[b]Mapping documents:[/b]
N/A

[b]Code between sessionFactory.openSession() and session.close():[/b]
N/A

[b]Full stack trace of any exception that occurs:[/b]
N/A

[b]Name and version of the database you are using:[/b]
Postgres 7.3.x

[b]The generated SQL (show_sql=true):[/b]
N/A

[b]Debug level Hibernate log excerpt:[/b]
N/A


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.