Hi Ilan,

> At least @PrimaryKey should be a separate annotation.

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

> > 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;

Yes

> >> 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 
String
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 
level.


Latest javadocs at the following links have them :-
http://www.jpox.org/docs/1_2/javadocs/Plugins/Java5/org/jpox/annotations/package-summary.html
http://www.jpox.org/docs/1_2/javadocs/Plugins/Java5/org/jpox/annotations/orm/package-summary.html


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 
attributes.


-- 
Andy

Reply via email to