8.7. Unconstrained query variables

The primary purpose of JDOQL variables is as identifiers for use in contains() clauses, facilitating the iteration through persistent fields of Collection type. However, the JDO specification does allow for the definition of query variables that are subsequently referenced in the filter expression, but not subject to a contains() clause. Such identifiers, known as unconstrained query variables, conceptually iterate across the entire extent (including subclasses) of their persistence-capable type.

The specification is particularly vague about the portability of query filters using unconstrained variables, and I will not discuss the concept further here. It has, however, been the subject of several threads of ...

Get Java™ Data Objects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.