There's an example of how to map a map in the XML FAQ section at

http://www.castor.org

In addition, you'll find plenty of more advanced samples in the Castor
CTF suite, our framework-internal test suite, where you'll find example
for mapping nested maps, maps of collections, etc.

To access these samples, you'll have to either ...

- check out the current source code from our SVN repository
- or download the source tarball from the download page.

I hope this helps.

Werner
Bryan Richardson wrote:
> Hello all,
> 
> I'm a newbie to using Castor.  I've done some searches, but can't find
> an answer to what I'm trying to do, so here goes:
> 
> Say I have the following mapping structure:
> 
> <mapping>
> <class name="Graph">
> <field name="nodes" type="Node" collection="collection" />
> </class>
> 
> <class name="Node">
> <field name="id" type="integer">
> <bind-xml name="id" node="attribute" />
> </field>
> </class>
> </mapping>
> 
> This works just fine... I end up with a Graph object that contains a
> collection of Node objects.  However, I need to replace my collection
> with a map, having the Node id as the key and the Node itself as the
> value.  Can anyone tell me how to describe this in the mapping
> structure?
> 
> Thanks in advance!! -- BTR
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>    http://xircles.codehaus.org/manage_email
> 
> 



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

    http://xircles.codehaus.org/manage_email

Reply via email to