Chapter 8. Queries with JDOQL

JDO’s transparent persistence allows applications to navigate through the persistent fields of an instance that are references to other persistent instances. As the application de-references these objects, those that are not present in the persistence manager’s cache are loaded from the data store. This gives the application the impression that the entire inter-connected graph of persistent instances is immediately available in memory.

The issue remains as to how an application should obtain the first persistent instance. Three methods are available.

  1. The application can use the persistence manager’s getObjectById() method if it is able to construct the Object ID instance. The Object ID may have been previously stored ...

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.