db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilan Kirsh <ki...@objectdb.com>
Subject Re: Annotation overrides
Date Wed, 20 Jun 2007 23:00:12 GMT
Hi Craig,

IMO, when using annotations it could be useful to add / remove index 
definitions using an external package.jdo file. It might also be useful 
sometimes to override other definitions (named queries, sequences, etc.) 
using external XML.

Ilan Kirsh
ObjectDB Software
http://www.objectdb.com


----- Original Message ----- 
From: "Craig L Russell" <Craig.Russell@Sun.COM>
To: "Apache JDO project" <jdo-dev@db.apache.org>; "JDO Expert Group" 
<jdo-experts-ext@Sun.COM>
Sent: Thursday, June 21, 2007 1:23 AM
Subject: Annotation overrides


> Hi,
>
> I'm looking at how annotations can be overridden by the xml metadata 
> files. It seems that the .jdo metadata that's not .orm metadata is an 
> exact duplicate of the annotation metadata. Is there ever a case  where 
> you would want to override the annotation with jdo metadata?  Seems that 
> it's really only the orm metadata in the annotations that  you want to 
> override.
>
> We did carefully consider that the orm metadata is just mapping, and 
> doesn't include information that would affect the object model. In  this 
> case, it seems that you would want to support these combinations:
>
> no annotations + .jdo (with jdo and orm metadata)
> no annotations + .jdo (with jdo and orm metadata) + .orm (overrides  all 
> orm in the jdo)
> annotations alone (includes jdo and orm metadata)
> annotations + .orm (overrides all orm in the annotations)
>
> So I'm proposing that we disallow annotations + jdo metadata file. In 
> other words, if you make the decision to provide annotations, you  can't 
> override the jdo metadata. The annotations are closer to the  Java file 
> which is what the jdo metadata is for.
>
> Craig
>
> 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