db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Jefferson <a...@jpox.org>
Subject Re: Thoughts about JDO 2.1 Annotation
Date Tue, 16 Jan 2007 11:18:52 GMT
Hi Ilan,

> At least @PrimaryKey should be a separate annotation.

Yes. Of course it already exists ... only it wasn't defined for Field/Method 

> > I think that should be
> > Class fieldType() void.class;
> > because otherwise it becomes "required".
> >
> > Similarly PersistenceCapable.objectIdClass
> I guess you are right, just 'default' seems to be missing:
>     Class fieldType() default void.class;


> >> 5. RecursionDepth
> >> Should be added somehow to the fields in @FetchGroup (and removed from
> >> @Field if unused).
> Maybe we need another annotation @FieldFetch.
> IMO reusing fields in fetch groups is also confusing in the XML metadata.

I agree, but I prefer @FetchField ;-)

I've now included some of these changes in JPOX CVS :-
1. Removed @Collection, @Map, @Array and embodied attributes in @Element, 
@Key, @Value
2. Changed all attributes that represent a class to be of type Class and not 
3. Added defaults for "name", "table" on @Unique, @Index, @ForeignKey so users 
can specify just the annotation with no attributes
4. Added @FetchField to represent a field within a @FetchGroup (with 
attributes name and recursionDepth). Removed "recursionDepth" from @Field
5. Updated @PrimaryKey to be usable at Field/Method level as well as Class 

Latest javadocs at the following links have them :-

Still to do:-
1. @Field "indexed" and "unique" attributes likely to be removed.
2. Put in single package (javax.jdo.annotations)
3. Consider making more of the field-level annotations specifiable without 


View raw message