thanks for suggestion, I modified the queries to read e.g. as follows:
@NamedQuery(name = "DataValue.findDistinctCreationtimesWithLimitDesc",
query = " select distinct dv.creationtime from DataValue dv"
+ " where dv.capabilityId.capabilityId member of :capabilities"
+ " and dv.creationtime >= :earliest"
+ " and dv.creationtime <= :latest "
+ " order by dv.creationtime DESC"),
this seems to work in ObjectDB, but fails with EclipseLink .. I really need a portable solution, would you class that as an EclipseLink bug?
Caused by: Exception [EclipseLink-8025] (Eclipse Persistence Services - 2.2.0.v20110202-r8913): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Syntax error parsing the query [DataValue.findDistinctCreationtimesWithLimitDesc: select distinct dv.creationtime from DataValue dv where dv.capabilityId.capabilityId member of :capabilities and dv.creationtime >= :earliest and dv.creationtime <= :latest order by dv.creationtime DESC], line 1, column 98: unexpected token [:capabilities].