Jozef,

for the Castor JDO part of things, I recommend looking at 

http://castor.exolab.org/jdo.html (use of castor jdo in general)

and 

http://castor.exolab.org/jdo-mapping.html (JDO mapping) 

for introductions on how to use Castor JDO in general, and how to create a mapping 
file related to persisting (existing) object hierarchies. 

In addition, there's a complete set of samples included with Castor JDO that showcase 
a couple of scenarios, incl. 1:1, 1:m relationships, extends, etc.

I hope this gets you started
Werner

On Thu, 26 Feb 2004 15:32:51 +0000, Jozef Aerts - Comp.Chem.Cons. - XML4Pharma wrote:

>
>Dear all,
>
>I have an XML file with data that have to go to a relational database.
>The XML file looks like:
>
><person name="Alice">
>       <bonus date="2004-01-12" amount="100"/>
>       <bonus date="2004-01-24" amount="50"/>
>       <bonus date="2004-02-22" amount="120"/>
></person>
><person name="Jerry">
>       <bonus date="2004-02-03" amount="70"/>
></person>
>
>The relational DB has a table "bonusses" with fields (columns):
>personname, bonusdate, bonusamount
>
>So the table would look like:
>
>personname     bonusdate       bonusamount
>------------------     --------------- -------------------
>Alice          2004-01-12      100
>Alice          2004-01-24      50
>Alice          2004-02-22      120
>Jerry          2004-02-03      70
>
>Using Castor, I generated Java classes from the XML-Schema
>and now am wondering how the mapping.xml should look like.
>
>Can anybody help me ?
>
>Sincerely
>
>Jozef Aerts
>
>_________________________________________________________________
>Play online games with your friends with MSN Messenger 
>http://messenger.msn.nl/
>
>----------------------------------------------------------- 
>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

Reply via email to