db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Ezzio (asmtp)" <dez...@bea.com>
Subject Re: Annotation overrides
Date Wed, 20 Jun 2007 23:05:44 GMT
Hi Craig,

Here are the two best reasons that I can think of to allow the 
combination you propose to eliminate.

One: since we are seeking harmony with JPA in the long term, we should 
consider that JPA allows XML metadata to override object model annotations.

Two: the easiest rule to learn doesn't have exceptions.  XML metadata 
overrides annotations.



Craig L Russell wrote:
> 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!

View raw message