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: FetchField cleanup in annotations
Date Wed, 18 Jul 2007 04:06:44 GMT
Just one more observation.

In addition to adding recursionDepth to @Field we should add it to  
@Property.

And add Property[ ] properties() default {} to FetchGroup.

That should cover nested FetchGroup and properties as well.

Looking again at <fetch-group> it doesn't look like the intent was  
actually to nest fetch-group but to allow references to embedded  
fetch-group by name, with the actual definition elsewhere.

Craig

On Jul 17, 2007, at 4:37 PM, Craig L Russell wrote:

> 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 FetchGroup:
>
> 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!
>

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!


Mime
View raw message