Thanks for the suggestion. I am currently using JDO. The mapping is generated by xdoclet. So long as I don't declare the foreign key relationship between the two elements it's fine. In the mapping below the visit object is represented by the patreg table whose key field is patregid. patregid is also used as a foreign key for child "visitactions".

mapping:

<class name="org.tri.api.regadt.model.Visit"
        identity="id"
        access="read-only"
        auto-complete="false">
   <map-to table="patreg" />

<field name=""
          type="org.tri.api.regadt.model.VisitAction"
          get-method="_getVisitActions"
          set-method="_setVisitActions"
          collection="arraylist">
     <sql
          many-key="patregid" />
   </field>

<!-- SNIP UNRELATED STUFF OUT -->

</class>

<class name="org.tri.api.regadt.model.VisitAction"
        identity="id"
        access="read-only"
        auto-complete="false">
   <map-to table="patregaction" />
   <cache-type type="count-limited" />

   <field name=""
          type="org.tri.api.regadt.model.Visit"
          get-method="_getVisit"
          set-method="_setVisit">
     <sql name="patregid" />
   </field>

<!-- SNIP UNRELATED STUFF OUT -->
</class>

Ralf Joachim wrote:
Hi Luke,

could you please tell us if you intend to use JDO or XML part of castor
and also post the relevant part of your mapping as this would help
others to understand your problem and suggest a solution.

Ralf


IMPORTANT: The information in this e-mail belongs to Toronto Rehabilitation 
Institute and may contain confidential and privileged information for the sole 
use of the individual or entity to which it is addressed. If you are not the 
intended recipient, you are hereby notified that any disclosure, copying, or 
distribution of the contents of this e-mail is prohibited. If you have received 
this e-mail in error, please contact the sender and destroy all copies of the 
original message.

Legal Disclaimer

-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to