Hi Stam,
try the following:
<mapping>
<class name="A">
<field name="b" type="B">
<bind-xml auto-naming="deriveByClass" matches="B1 B2 B3 B4"/>
</field>
</class>
<class name="B">
...
</class>
<class name="B1" extends="B">
<map-to xml="B1"/>
...
</class>
...
</mapping>
--Keith
Stamatis Karbounarakis wrote:
>
> Hello. I am using castor for the first time and I have the following
> problem. In my xml the root element is A for example and it's sub-element
> is either B1 or B2 or B3 or B4. So I have defined an "alias" B,that is
> either B1,B2,B3,B4 which does not of course correspond to an actual
> element in the xml, as the sub-element of A. My problem is when I create
> the mapping. I map element A to it's implementing class A,but the only
> field of A is of "type" B. So the actual elements B1,B2,B3,B4 remain
> practically unmapped. Is there a way to map them? I don't know if I have
> made my problem clear enough. Any help will be greatly appreciated.
>
> Thanx!
>
> Stam
>
> -----------------------------------------------------------
> 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