Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
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

----- James Sutherland
 EclipseLink ,
Wiki: EclipseLink , TopLink 
Forums: TopLink , EclipseLink 
Book: Java Persistence 
View this message in context:
Sent from the EclipseLink - Users mailing list archive at

Back to the top