Hello Keith,

There is the requirement of altering the XML document so generated in terms of adding additional attribute for better understanding of the same by the other interfaces interacting with the this XML document example the COI Archival system.

The following document shows the XML document generated using the Mapping option representing the underlying java classes:


<Auftragsposition AuftragspositionOID="1019738737353">

                 <DienstleistungsNummer>HU</DienstleistungsNummer>
             <Person PartnerOID="0000108G100TKKS4O3N0590">
                       <Name>SCHELLING</Name>
                       <Name2>JOCHEN</Name2>
         </Person>
                <Organisation PartnerOID="0000108G100TKKS4O3N0590">
                 <Name>SCHELLING</Name>
                 <Name2>JOCHEN</Name2> 
    </Organisation>
</
Auftragsposition >
 
The above is to be represented as:
 
<Auftragsposition AuftragspositionOID="1019738737353">
                 <DienstleistungsNummer>HU</DienstleistungsNummer>
             <AuftragPartner type="Person" PartnerOID="0000108G100TKKS4O3N0590">
                       <Name>SCHELLING</Name>
                       <Name2>JOCHEN</Name2>
         </AuftragPartner>
      <AuftragPartner type="Organisation" PartnerOID="0000108G100TKKS4O3N0590">
                 <Name>SCHELLING</Name>
                 <Name2>JOCHEN</Name2> 
    </AuftragPartner>
</Auftragsposition >
The Auftragsposition has a one to many relationship with Partner which are of types Person and Orgnaisation.
Auftag is bascially an order and Auftragposition is the order postion for your information.
So a given auftragpostion can have many partner and the same is to be represente din the above mentioned form.
I was probing into the field Handler functionality perhaps using the create-method attribute...whcih wud allow me to use my code to be run to generate the above mentined output, thus being called through the mapping file so written.


Chetan Rathi
Augsburger Str.336
70327 Stuttgart
Tel no.0711-7861-3148(off.)
Handy.no.015055564671
 
>From: Franck Routier <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: [castor-dev] Howto handle multiple reference to same table with castorjdo
>Date: 03 May 2002 11:53:27 +0200
>
>Hi,
>
>I have two tables :
>
>CREATE TABLE team ( id INTEGER UNIQUE,
> name VARCHAR(20)
> );
>CREATE TABLE match ( id INTEGER UNIQUE,
> home INTEGER REFERENCES team,
> visitor INTEGER REFERENCES team
> );
>
>What I would like is a team java object with 4 fields : an integer id, a
>string name and two collections of matches, one for the matches at home,
>one outside.
>
>But when I do :
>
>oql = db.getOQLQuery( "SELECT team FROM ldp.data.Team team" );
>results = oql.execute();
>
>I get the following exception :
>
>java.sql.java.sql.SQLException: ERROR: Table name "matchs" specified
>more than once while executing SELECT
>"team"."id","team"."name","match".id","match"."id" LEFT OUTER JOIN
>"match" ON "team"."id" = "match"."home" LEFT OUTER JOIN "match" ON
>"team"."id" = "match"."visitor"
>
>Am I misconfiguring something, or is it a bad conception of my database,
>or is it not handled by Castor ??
>
>Thanks
>
>Franck Routier
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev


Chat with friends online, try MSN Messenger: Click Here
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev

Reply via email to