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: Ease of use for annotations
Date Sat, 30 Jun 2007 20:07:04 GMT
Hi Craig,

> This might be controversial, but my Annotations Feature Request #3 is
> to allow the annotation to declare which element is the default if
> there is only one value specified. In this case, it would be "name".

I was thinking of the same thing :-)

Can't see why that should be controversial (and would only require an extra 
keyword allowing on the definition of the annotation to define which element 
is the default). Leaving out the ability (in JDK1.5) to have a null element 
default value is far more controversial IMHO, or not allowing inherited 
annotations, or not allowing cyclic annotations, or ...

> >> Also @Field (column="DEPARTMENT")
> >
> > I've no problem with adding that shortcut String property to @Field
> > but would mention that several shortcuts were removed from non-ORM
> > annotations to try to keep a clean divide between JDO and ORM.
> Could you possibly expand more on this?

OK, in the XML metadata some elements have a String shortcut for something 
that could be specified in a sub-element, but allows the shortcut where the 
user just wants the primary thing ... like name of the column rather than 
adding <column>. Maybe I was thinking there were more than there actually 
are. The ones I now see having a quick compare of the DTD and the annotations 
are :-
<field> has "delete-action", yet no "delete-action" annotation element.
<field> has "indexed", yet no "indexed" annotation element.
<field> has "unique", yet no "unique" annotation element.

> > It would be nice to get these into Apache JDO SVN by early next  
> > week if at all possible since I want to get the next JPOX 1.2 beta out 
> > using them 

> Ah, deadlines. I'll see how much I can do in the next few days to wrap 
> things up. 


Andy  (Java Persistent Objects - http://www.jpox.org)

View raw message