I don't believe Castor supports self references yet. I think the guys are working on implementing it though.
The way I've done that is as follows: instead of this: A 0-to-n A you could have this: B extends A; B 0-to-n A -----Original Message----- From: Thomas Salwender [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 05, 2001 1:15 PM To: [EMAIL PROTECTED] Subject: [castor-dev] Problems with update for foreign-keys -> null! Hi all, i have a Container with a reference to its self. Now, if i construct a Container and add child-container to it, then the foreign-keys are null. I never get the reference from the childs to their parent. I've tried it in Single-Transaction and Long-Transaction, ... didnt work! I'm using the latest castor snapshot! Any Ideas? My mapping.xml: <class name="de.contentmedia.portal.services.cm2.helper.MyCMContainer" identity="ID" key-generator="RETURNING"> <description>All Containers</description> <map-to table="CM_CONTAINER" xml="CONTAINER" /> <field name="ID" type="integer" > <sql name="ID" type="integer"/> <xml name="ID" node="attribute"/> </field> <field name="CMContainerVector" type="de.contentmedia.portal.services.cm2.helper.MyCMContainer" required="true" collection="vector"> <sql many-key="CONTAINER_ID" /> <xml name="CONTAINER" node="element"/> </field> </class> TIA Tom ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
