After thinking more about this, I'd like to withdraw the proposal of FetchPlan.setRecursionDepth().

However, it would be nice if a detached object could "lazy-load" (detach on demand) any field that is not loaded yet, provided the database is accessible. From my current experience, it is very hard to limit a detachment closure to what is exactly needed, using FetchPlan.setMaxFetchDepth() and recursion-depth metadata (or, if it existed, FetchPlan.setRecursionDepth()).

We use detachment mainly for being able to modify objects outside of a transaction and without state being persisted immediately, e.g. for validators in a web-application that operate on the model objects, and to avoid form objects for keeping user input between HTTP requests. Here it would be very handy if any field not loaded yet would be loaded on demand, since one always seems to come across an unloaded field during display.

Not sure about the implications for implementations. If this feature is agreed to be interesting I'll try to come up with something here. This of course won't work with detached objects being serialized to a different VM.

Joerg von Frantzius schrieb:
Since we have setMaxFetchDepth() on FetchPlan, it would be good to also have a setRecursionDepth() on FetchPlan, maybe in addition to having the annotation on field level.

At least I have a use-case here where that would be desirable.

Craig L Russell schrieb:
Hi,

Now that JDO 2.1 has shipped, it's time to think about the next release. We have some bugs to fix, some cleanup that didn't make 2.1, and some new things that should be done.

I'd like to get to a quicker release cycle now that all of the big ticket items are done (Java 5, Annotations, JPA alignment).

Here are the new features I'd like to do for JDO 2.2:

https://issues.apache.org/jira/browse/JDO-554 Dynamic fetch plans. We currently have metadata for fetch plans but no way to dynamically configure them.

https://issues.apache.org/jira/browse/JDO-556 Use Java 6 ServiceLoader pattern for PersistenceManagerFactory lookups. This needs a minor change to the contract for PersistenceManagerFactory to provide for a no-args constructor used by JDOHelper.

https://issues.apache.org/jira/browse/JDO-552 Add new constructors for exceptions

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!





--
____________________________________________________________________
artnology GmbH - Milastraße 4 - 10437 Berlin - Germany
Geschäftsführer: Ekkehard Blome (CEO), Felix Kuschnick (CCO)
Registergericht: Amtsgericht Berlin Charlottenburg HRB 76376 UST-Id. DE 217652550

Reply via email to