Hey guys, 

I  am trying to Unmrashall a class bound to 2 elements with different names.
Here's how my mapping file looks like -

<class name="Obj1" auto-complete="true">
        <map-to xml="Obj1" ns-prefix="ns3"/>
       
       <field name="OriginalCar"
            type="org.foo.CarBean">
            <bind-xml name="OrigCar" />
        </field>
</class>
....
<class name="Obj2" auto-complete="true">
       <map-to xml="Obj2" ns-prefix="ns3"/>
       
       <field name="OtherCar"
            type="org.foo.CarBean"  >
            <bind-xml name="OthCar" node="element"/>
        </field>
</class>
.....
<class name="org.foo.CarBean"  auto-complete="true">
        <map-to ns-prefix="ns3" xml="OrigCar"/>
        ....
</class>

Now when i unmarshall with the above mapping, I get a CarBean obj created
for Obj1 but not for Obj2. That is because the map-to element is referring
to "OrigCar". What do I need to do to make this work for both ? 

- Tried declaring the CarBean inside Obj1 and Obj 2 but i get an error
:saying i cannot declare a class with the same ID twice. 

Thank you
-- 
View this message in context: 
http://old.nabble.com/Unmrashalling--class-bound-to-2-elements-with-different-names-tp31625705p31625705.html
Sent from the Castor - User mailing list archive at Nabble.com.


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

    http://xircles.codehaus.org/manage_email


Reply via email to