07-19-07 06:11 AM
Hi Craig,
> Doesn't bother me as much as duplicating Field/Property all over.
Me neither, but have to play devils advocate ;-)
> This is another anomaly: FieldPersistenceModifier should become
> PersistenceModifier.
+1.=20
It was a hangover from when I originally had ClassPersistenceModifier and=20
=46ieldPersistenceModifier.
> How about creating a new tag like @NotPersistent. To go along with
> @Transactional and @Persistent.
@Transient is already there :-)
The only place that "persistenceModifier" would then be used is in the=20
specification of persistence of embedded objects, or overriding inherited=20
fields - so the user may wish to *not* persistent a particular field. In th=
is=20
case they would have to use @Persistent(persistenceModifier=3DNONE)
Overriding inherited fields :-
One other area if you really want to provide annotations with the full=20
capability that XML has. In XML you can override (inherited) fields=20
persistence specifications in subclasses. With Annotations this currently=20
isn't possible. This could be remedied by changing the specification of=20
@Field/@Property (@Persistent) to be for ElementType.TYPE too.
=2D-=20
Andy =A0(Java Persistent Objects - http://www.jpox.org)
[ Post a follow-up to this message ]
|