Hi werner I read the the reference how-to, but I don't get it to work as I would. The keys appears in on the model, but where are the key definitions?
I read the reference many times, but not getting it working... Can you give me some hints what are my problems? Thank you Daniel I made a mapping like this: --------------------------------------------- <?xml version="1.0"?> <!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN" "http://castor.org/mapping.dtd"> <mapping> <class name="com.solarmax.maxsim.model.Datakey" identity="id"> <map-to xml="data-key" /> <field name="id" type="string"> <bind-xml name="id" node="attribute" /> </field> <field name="description" type="string"> <bind-xml name="description" node="attribute" /> </field> </class> <class name="com.solarmax.maxsim.model.DeviceModel"> <map-to xml="model" /> <field name="name" type="string"> <bind-xml name="name" node="element" /> </field> <field name="attributes" type="com.solarmax.maxsim.model.Datakey" collection="collection"> <bind-xml name="data-key" reference="true" /> </field> </class> </mapping> And get a xml file like this: --------------------------------------------- <models> <model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="model"> <name>S 2000C</name> <data-key>rad</data-key> <data-key>rad_e_day</data-key> <data-key>rad_e_month</data-key> <data-key>rad_e_tot</data-key> <data-key>rad_e_year</data-key> <data-key>status_alarm</data-key> <data-key>status_system_new</data-key> </model> <model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="model"> <name>S 4000C</name> </model> <model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="model"> <name>S 5000C</name> </model> </models> On Thu, 17 Apr 2008 16:41:37 +0200, Werner Guttmann <[EMAIL PROTECTED]> wrote: > You might want to have a look at > > http://castor.org/how-to-use-references-in-xml.html > > to get you started. > > Werner --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

