openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Koch <jo.k...@sap.com>
Subject Re: JPQL Query on Collection<String>
Date Thu, 24 Apr 2008 22:26:04 GMT

What would this look like if the collection is not a Set but a Map? I was
able to persist the map correctly and can retrieve objects with map
attributes from the database, but how can I query to receive only those
entities with a specific (key,value) pair in their map attribute? What I
tried is
String jpql = "SELECT p FROM MyObject p WHERE (?1,?2) MEMBER OF
p.myMapAttribute";
but this only gets me a org.hibernate.hql.ast.QuerySyntaxException:
unexpected end of subtree
-- 
View this message in context: http://www.nabble.com/JPQL-Query-on-Collection%3CString%3E-tp16347010p16853894.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message