Thomas Louis wrote:
>
> Hello,
>
> how can I pretend to map some fields of my class to XML. I can't declare
> them "transient" because they had to be mapped for JDO.
For now, I believe you'll have to maintain two separate mapping files.
However
we have discussed in the past adding a transient attribute to the
bind-xml element.
So in the future it may be directly supported.
--Keith
>
> Example:
> Mapping-file:
>
> <class name="Item" identity="id" key-generator="MAX">
> <map-to xml="item" table="item"/>
> <field name="id" type="integer">
> <sql name="item_id"/>
> </field>
> <field name="content" type="java.lang.String">
> <sql name="content"/>
> <bind-xml name="content" node="text">
> </field>
> </class>
>
> The problem occurs, when I marshall the items. Then the generated XML looks
> like that:
>
> <item>Foo<id>0</id></item>
> <item>Bar<id>0</id></item>
>
> But I don't want these <id>s neither than an element nor an attribute.
>
> Do you know what to change in the mapping file?
>
> Thomas
>
> -----------------------------------------------------------
> 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