Ease of use for annotations
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache JDO Project > Ease of use for annotations




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Ease of use for annotations  
Craig L Russell


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-30-07 12:11 AM






[ Post a follow-up to this message ]



    Re: Ease of use for annotations  
Andy Jefferson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-30-07 12:11 PM

> It would be nice if we could have @Column("DEPARTMENT") instead of=20
> @Column(name=3D"DEPARTMENT").=20

I've no particular problem with that but would point out that when you need=
to=20
specify more than just the column name you would have
@Column(value=3D"DEPARTMENT" jdbc-type=3D"BLOB")
i.e "value" and not "name" (and "name" is more logical when doing that)

> Also @Field (column=3D"DEPARTMENT")

I've no problem with adding that shortcut String property to @Field but wou=
ld=20
mention that several shortcuts were removed from non-ORM annotations to try=
=20
to keep a clean divide between JDO and ORM.



On a related subject, previous discussion of @Table, @SecondaryTable,=20
@JoinTable mentioned why is the table name "table" and not "name". I've=20
absolutely no problem with it being "name" (and would make JDO2.1 annotatio=
ns=20
consistent with JPA1 in this respect). If contemplating the change above fo=
r=20
@Column, maybe you're also thinking of
@Table("MYTABLE")
which would mean the annotation property for the table name would be "value=
".



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

=2D-=20
Andy =A0(Java Persistent Objects - http://www.jpox.org)






[ Post a follow-up to this message ]



    Re: Ease of use for annotations  
Craig L Russell


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-01-07 12:11 AM






[ Post a follow-up to this message ]



    Re: Ease of use for annotations  
Andy Jefferson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-01-07 12:11 AM

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=
=20
keyword allowing on the definition of the annotation to define which elemen=
t=20
is the default). Leaving out the ability (in JDK1.5) to have a null element=
=20
default value is far more controversial IMHO, or not allowing inherited=20
annotations, or not allowing cyclic annotations, or ...
 
>
> Could you possibly expand more on this?

OK, in the XML metadata some elements have a String shortcut for something=
=20
that could be specified in a sub-element, but allows the shortcut where the=
=20
user just wants the primary thing ... like name of the column rather than=20
adding <column>. Maybe I was thinking there were more than there actually=20
are. The ones I now see having a quick compare of the DTD and the annotatio=
ns=20
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.


 
=20[vbcol=seagreen] 
[vbcol=seagreen]
> Ah, deadlines. I'll see how much I can do in the next few days to wrap=20
> things up.=20

Thx

=2D-=20
Andy =A0(Java Persistent Objects - http://www.jpox.org)






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:35 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register