|Re: [eclipselink-users] CriteriaQuery, SubSelect and in|
Could you include the code for your criteria query. IN should be supported with sub-queries. Michael Simons wrote: > > Hello, > > does anybody know whether you can do a query like the following with a > CriteriaQuery. > SQL (vehicle<*:1>domain, user<*:*>domain): > select v.* > from vehicle v > where v.domain_id in (select domain_id from user_domain where user_id = > ?); > > I unfortunately failed with this attempt. It's denied with a message like > "in(Expression<?>... values) was invoked with an expression type: > org.eclipse.persistence.internal.jpa.querydef.PathImpl@812517 that was > neither a literal nor a > parameter. This is not supported.". > > Does that mean the combination of the in-operator and a subquery is not > supported at all? > > Any help is appreciated. > > Kind Regards, Michael > > ----- http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland http://www.eclipse.org/eclipselink/ EclipseLink , http://www.oracle.com/technology/products/ias/toplink/ TopLink Wiki: http://wiki.eclipse.org/EclipseLink EclipseLink , http://wiki.oracle.com/page/TopLink TopLink Forums: http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , http://www.nabble.com/EclipseLink-f26430.html EclipseLink Book: http://en.wikibooks.org/wiki/Java_Persistence Java Persistence -- View this message in context: http://old.nabble.com/CriteriaQuery%2C-SubSelect-and-in-tp27820773p27837471.html Sent from the EclipseLink - Users mailing list archive at Nabble.com.
Back to the top