Hi Andy, Good catch.
This brings up a question. In JPOX, if you enhance a class with a field that is NotPersistent, can you then in an embedded use case mark the same field as Persistent? The spec doesn't really address this issue. The implication is that the enhancer would need to enhance every field as if it were Persistent, even if it's marked NotPersistent, just in case it's overridden in the embedded case. And then each field access to a NotPersistent field would need to check to see if it's still NotPersistent for this particular case.
More questions than answers. Are we sure that it's a good idea to allow overriding the PersistenceModifier in embedded usages?
Craig On Jul 21, 2007, at 12:43 AM, Andy Jefferson wrote:
The only reason to have PersistenceModifier at all is to make it possible to say @Persistent (persistenceModifier=PersistenceModifier.NONE) or @Persistent (persistenceModifier=PersistenceModifier.TRANSACTIONAL). It can be removed without loss of functionality.It *cannot* be removed with no loss of functionality. If I need to specifythe fields of an embedded instance and I want to override thepersistence-modifier setting of a field how would I do that? I don't see it since I cant specify @NotPersistent in the "fields" of @Embedded sinceit takes an array of @Persistent. -- Andy Java Persistent Objects (JPOX)
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!
smime.p7s
Description: S/MIME cryptographic signature
