db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: JDO TCK Conference Call Friday, July 20, 9 am PDT
Date Sat, 21 Jul 2007 15:48:55 GMT
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?


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  
> specify
> the fields of an embedded instance and I want to override the
> persistence-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  
> since
> it 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:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!

View raw message