Hi,

As part of the change to add fetch plan to query, we added a name to a fetch plan. Now we need to decide whether to expose the name via API. The obvious thing to do is to add a method getName() to FetchPlan.

<proposed>
12.7.5
String getName();
Return the name of the fetch plan. The default fetch plan name for new PersistenceManager instances is "default". The name is preserved if copied to a query or extent instance. If any change is made to the fetch plan via any add, remove, set, or clear method, the name changes to the empty String.

The scope for fetch plan name is global. All named fetch plans, whether defined in annotations or via jdo or jdoquery metadata files, are available to named queries.
</proposed>

We also need to add some text to the query api so that the fetch plan in metadata is reflected in the query api.

Here's some proposed text for query:

<proposed>
14.6
For named queries with a fetch plan specified in metadata, the fetch plan is the named fetch plan. If no fetch plan is specified in metadata, the fetch plan is a copy of the fetch plan of the persistence manager at the time the query instance is created.

If the named query is marked as unmodifiable in the metadata, the fetch plan cannot be modified.
</proposed>

There are other things we can do now that we have a name for fetch plans in metadata. We can push and pop fetch plans and access named fetch plans from metadata. But I think we should defer these topics to post-2.1.

Craig

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to