Thank you for quick reply, but I'm still having trouble.
"and t.Persons[:user] = true" -> Index was outside the bounds of the array.
"and indices(t.Persons) = true" -> database server says that the query syntax is invalid (incorrect syntax near....)
tried also :
"and elements(t.Persons)=true" -> Invalid column name 'true'
"and elements(t.Persons)=1" -> subquery returned more than 1 result ....
That brings me an idea to use subquery but I'm still mixed. I think about something like:
Code:
select t from Task t where (:user = some indices( "select * from t.Persons where Value=true" ) )
Of course this is wrong, I have no idea what to put instead of "select * from t.Persons where Value=true" .
In the docs there are examples of HQL queries with subqueries but only for "set" and "list" collections. I can't find any example with "map".
Any futher suggesions?
--
michal