Let’s say I have a map (call it myClass.mapElem<Object, Object>) like so:
Key Val
A X
B Y
C X
I want to write HQL that can query the Values such that I can get back all instances of myClass where mapElem’s value is ‘X’ (where ‘X’ is a fully populated object– I just don’t want to go through each element and say x.e1 = mapElem.e1 and x.e2=… etc). I know I can do this for the keys by using where ? in index(myClass.mapElem), I just need the corresponding statement for querying the values!
Thanks in advance…
ETA: Not sure if the syntax makes a difference, but the way I am actually querying this is like so:
select myClass.something from myClass mc join myClass.mapElem me where...
In my particular case, I ended up having to use an SQL query. Not ideal, but it worked.