db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew T. Adams" <matthew.ad...@xcalia.com>
Subject RE: Annotation overrides
Date Wed, 20 Jun 2007 23:08:39 GMT
That seems a little extreme to me, although I do see your point.  I'm not
convinced that we should disallow overrides of logical annotations.

The use case that comes to mind is the typical one of needing to modify
behavior without having to recompile.  Without overrides, you couldn't do

Lastly, it makes overriding inconsistent between logical and mapping
metadata.  Mapping metadata would be overridable but logical metadata
wouldn't -- makes for a higher learning curve to me.


-----Original Message-----
From: Craig.Russell@Sun.COM [mailto:Craig.Russell@Sun.COM] 
Sent: Wednesday, June 20, 2007 3:23 PM
To: Apache JDO project; JDO Expert Group
Subject: Annotation overrides


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 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