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" <[EMAIL PROTECTED]> To: "Apache JDO project" <[email protected]>; "JDO Expert Group" <[EMAIL PROTECTED]>
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:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!




Reply via email to