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 FetchField cleanup in annotations
Date Tue, 17 Jul 2007 23:37:04 GMT
Now that we've rationalized the foreign keys, can we take another  
look at the FetchField?

We added the field name to Field for embedded. Can we add  
recursionDepth as well? Then instead of this:

@FetchGroup(fields={@FetchField(name="line", recursionDepth=2)}

we would have this:

@FetchGroup(fields={@Field(name="line", recursionDepth=2)}

It's a minor point, but I sorta hate to have an additional FetchField  
annotation if it isn't needed.

And can we fix the nested FetchGroup problem by adding an element to  

String[] fetchGroups() default {};

since we use the names of fetch groups elsewhere and only use the  
FetchGroup annotation to define the group.

So, proposal:

1. Add recursionDepth to @Field.

2. Remove @FetchField.

3. Change @FetchGroup     FetchField[] fields(); to    Field[] fields();

4. Add to @FetchGroup String[] fetchGroups() default {};

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