I couldn't find the example. I just found 
castor-1.1.2.1\xmlctf\tests\MasterTestSuite\mapping\collections\Maps\NestedMaps\MapOfCollections.
 I don't know how to transfer that example to work with collection of 
collections.

Another question was regarded to collections: Is there a way to map a 
collection containing different types.
<root>
  <mycollection>
     <string>test1</string>
     <integer>1</integer>
     <integer>2</integer>
     <string>test2</string>
  </mycollection>
</root>
I couldn't find a example for this and can't imagine how to do it as I think 
that a type attribute for a <field collection="collection"/> is required.
-------- Original-Nachricht --------
> Datum: Thu, 18 Oct 2007 13:47:21 +0200
> Von: Werner Guttmann <[EMAIL PROTECTED]>
> An: [email protected]
> Betreff: Re: [castor-user] Collection of Collections

> Yes, it does. Have a look at teh current CTF test suite that has 
> examples on how to map nested collections.
> 
> Werner
> 
> [EMAIL PROTECTED] wrote:
> > Hello,
> > 
> > I would like to map the following XML to Java:
> > 
> > <result>
> >   <bar>baz</bar>
> >   <rows>
> >     <row>
> >       <integer>123</integer>
> >       <integer>321</integer>
> >       <string>foo</string>
> >     </row>
> >     <row>
> >       <integer>123</integer>
> >       <integer isNull="true"/>
> >       <string>foo</string>
> >     </row>
> >   </rows>
> > </result>
> > 
> > In Java words this is a Result class with one String bar attribute and
> > a rows Collection. The Collection contains row elements which are
> > themself Collection (a row can a have arbitrary number of cells). My
> > question is: does Castor support Collections of Collections
> > (rows->row->cell)? How would the mapping xml file look like? If there
> > is a problem for castor with the mixed types of the cells, the
> > following xml would be okay too:
> > 
> > <result>
> >   <bar>baz</bar>
> >   <rows>
> >     <row>
> >       <col type="integer">123</col>
> >       <col type="integer">321</col>
> >       <col type="string">foo</col>
> >     </row>
> >     <row>
> >       <col type="integer">123</col>
> >       <col type="integer" isNull="true"/>
> >       <col type="string">foo</col>
> >     </row>
> >   </rows>
> > </result>
> > 
> > Kind regards
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email

-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to