Title: mapping.xml -- field type

Hi there, two questions

1. I generated classes using Castor XML and one of the methods gets and sets type "jdo.databinding.types.DebitCreditType" (it is really a string but has restrictions set in schema). When I use the mapping to try set/get this field it gives errors - eg.

field name="debitCredit" type="jdo.databinding.types.DebitCreditType">
                        <sql name="debitCredit"/>
                        <bind-xml name="debitCredit" node="element"/>
</field>

2. When I have one to many relationship specified in mapping file and I use Castor JDO to output xml I get the many field wrapped in a xml tag. How do I get rid of this extra tag?? eg.

<class name="jdo.databinding.Transaction" identity="ddId" auto-complete="false">
                <description>Transaction</description>
                <map-to table="transaction" xml="transaction"/>
                <field name="ddId">
                        <sql name="dd_id" type="integer"/>
                        <bind-xml name="ddId" node="attribute"/>
                </field>
                <!-- Transaction has reference to Financial - many financials per transaction  -->
                <field name="financial" type="jdo.databinding.Financial" collection="vector">
                        <sql many-key="dd_id"/>
                </field>
</class>

the output is this

<transaction ddId="4">
        <financial>                                     --------- want to get rid of this element
                <financial id="1">
                        <date/>
                </financial>
                <financial id="2">
                        <date/>
                </financial>
        </financial>                                    --------- and  this element
</transaction>

       
help on these 2 problems much appreciated
Jamie



Reply via email to