Hi,
I've looked all around the web and in
Hibernate in Action, but I haven't found an answer to this problem.
I have a mapped class Foo which contains a Map called properties. I'd like to query for all Foo where the properties map contains (or does not contain) a key/value pair.
I've tried the following syntax:
Code:
q.add(Expression.eq("properties.foo", "bar"));
(Where "q" is a Criteria object, "properties" is the name of the Map, "foo" is the key I'm interested in, and "bar" is the value I'm interested in."
That generated the following exception:
Code:
org.hibernate.QueryException: could not resolve property: properties.foo
So, how do you write queries against mapped Maps?
Thanks in advance for your help with this, and apologies if I've missed the obvious answer.
--Blake