Hi Gus,Tried this but I am having issues....
The current JDO implementation does not inherit the ODMG stuff. You should use simple java.util.Collection attributes for your collections. You'll have to define collection-descriptors with auto-retrieve="true", auto-update="false" and auto-delete="false".
cheers, Thomas
I have an person object that holds a collection of ContactInfo. People may be contacted at more than one place... etc. The contact info objects are perfectly happy not knowing who they contact (they have no reference to Person). This is an 1:n mapping, but the n contacts have no dependancy on the 1 person. The xdoclet module seems to require that the ContactInfo's all know about the Person's. This seems like a silly requirement.
From the ojbdoclet documentation:
foreignkey
Contains one or more foreign key field or columns (separated by commas).
If the collection implements an 1:n association, then this attribute specifies the fields in the element type that implement the association on the element side. Note that these fields are required to have the ojb.field
From my class
/** * @ojb.field * @ojb.collection auto-retrieve="true" * auto-update="false" * auto-delete="false" */ Collection ContactsCollection;
The error:
Generating repository_user.xml. (XDocletMain.start 53 ) Running XDoclet failed. (XDocletMain.start 54 ) <<No foreign keys specified for collection ContactsCollection in type org.cs101.fdb.impl.jdo.PersonBase.>> build.xml [323] XDoclet failed. at xdoclet.DocletTask.start(DocletTask.java:461) at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:95) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166) at org.apache.tools.ant.Task.perform(Task.java:319) at org.apache.tools.ant.Target.execute(Target.java:309) (the trace is about 30 miles long... I'll post it if it helps).
How do I get around this? or am I forced to put in useless, backreference?
-Gus
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]