Hello Keith,

As indicated in the XML document given below:

Auftragposition references its parent Auftrag.....

The current version of the XML document generated is as follows:

<Auftragsposition AuftragspositionOID="1019738737353">

        <betragBrutto>0.0</betragBrutto>
        <betragOffen>0.0</betragOffen>
    <Zahlungsart>B</Zahlungsart>
        <TpGebiet>18</TpGebiet>
-      <MyAuftrag AuftragOID="1019738737354">
             <AuftragErteiltDatum>2002-04-25T14:45:38.000</AuftragErteiltDatum>
             <ErfasstVon>0100002371</ErfasstVon>
        </MyAuftrag>
 </Auftragsposition >
 
We just want an reference to the auftrag object with the primary key being the auftragOID...
and are expecting the resultant document to be some what like the foloowing...with a refernce to the auftrag with the auftragOID as an attribute...
 
<Auftragsposition AuftragspositionOID="1019738737353">
        <betragBrutto>0.0</betragBrutto>
        <betragOffen>0.0</betragOffen>
    <Zahlungsart>B</Zahlungsart>
        <TpGebiet>18</TpGebiet>
-      <MyAuftrag AuftragOID="1019738737354"/>
    </Auftragsposition >
The mappinf wht i have used is:
Mappinf content:
 
<class name="com.dekra.automobil.auftragswesen.pbo.vbsf.PBOVBSFAuftrag" identity="auftragOID">
  <map-to xml="Auftrag"/>
  <field name="auftragOID" type="java.lang.String">
   
<bind-xml name="AuftragOID" node="attribute"/>
  </field>
</class>
 
<class name="com.dekra.automobil.auftragswesen.pbo.vbsf.PBOVBSFAuftragsposition" identity="auftragspositionOID">
  <map-to xml="Auftragsposition"/>
<field name="MyAuftrag" type="com.dekra.automobil.auftragswesen.pbo.vbsf.PBOVBSFAuftrag" get-method="getMyAuftrag">
   <bind-xml name="MyAuftrag" node="element" reference="true"/>
  </field>
</class>
We are using the castor tool only for the marshalling and the unmarshalling of the java object model using the mapping file.
I am using the CVS version :
castor 0.9.3-jar file..
The mapping.dtd indicates the reference and the identity tags...
Kindly let me know the correct way of representing the same.....
Does castor not support references???????
I have laready posted the same query couple of times, i am yet to have a answer for the same.
Your prompt response would highly be appreciated.
 
Regards,

Chetan Rathi
Augsburger Str.336
70327 Stuttgart
Tel no.0711-7861-3148(off.)
Handy.no.015055564671
 
>From: Keith Visco <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: [castor-dev]
>Date: Fri, 30 Nov 2001 14:15:57 -0600
>
>
>
>Chetan Rathi wrote:
> >
> > Hello,
> >
> > In order to handle back references, i have implemented the
> > reference="true" in the bind-xml tag.
> >
> > We have scenario :
> >
> > Auftrag class having 1:many relation ship with the auftrag position
> > class.
> >
> > The following is the mapping file excerpt as reagards the above
> > relationship:
> >
> > > > name="com.dekra.automobil.auftragswesen.pbo.vbsf.PBOVBSFAuftrag"
> > identity="auftragOID" >
> >
> >
> > > > set-method="setAuftragOID" get-method="getAuftragOID">
> >
> >
> >
> >
> >
> > > > name="com.dekra.automobil.auftragswesen.pbo.vbsf.PBOVBSFAuftragsposition"
> > depends="com.dekra.automobil.auftragswesen.pbo.vbsf.PBOVBSFAuftrag">
> >
> >
> > > > type="com.dekra.automobil.auftragswesen.pbo.vbsf.PBOVBSFAuftrag">
> >
> >
> >
> >
> >
> > I was checking the mapping.dtd file but couldt find the attribute
> > reference in the above mentioned tag.
> >
>
>Which version of Castor are you using?
>
>It's definately listed in the CVS version.
>
>If you are not using the CVS version I suggest you upgrade to that, it
>may
>solve the problems you are facing.
>
>--Keith
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>


Get your FREE download of MSN Explorer at http://explorer.msn.com.
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev

Reply via email to