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
|