Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] CriteriaQuery, SubSelect and in


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

Back to the top