Hi,
We got the generated mapping.xml but it doesnt have mappings to the fields
in the DB table ... what we saw only the table name being mapped to the java
class name  but it should generate for all fields also.

Example:
if employee table has fields like empid,empname etc....
but in mapping.xml we can only see as below ..
<class name="com.xxx.orchutility.Employee " access="shared">
                <map-to xml="Employee " element-definition="true"/>
        </class>

but we would like to have as....
<class name="com.xxx.orchutility.Employee " identity="empid">
    <map-to table="Employee " xml="Employee " />
    <field name="empname " type="string" >
          <sql name="empname " type="char" />
          <!--xml name="productname" node="element" /-->
    </field>
    <field name="empid" type="long" >
      <sql name="empid" type="numeric" />
    </field>
</class>

can we generate such above mapping ??

Thanks,

Werner Guttmann wrote:
> 
> Okay, if you want to be using Castor JDO, then you will need a mapping
> file. There's a flag on the source generator that allows you
> 
> a) to turn off generation of the descriptor classes (-noDesc)
> b) to turn on generation of a mapping file instead. (-gen-mapping)
> 
> Have a look at http://castor.org/srcgen-cline.html for more details. If
> you happen to be using e.g. the Maven plugin or the Ant tasks, those
> parameters are exposed there as well.
> 
> Regards
> Werner
> 
> Madhu CM wrote:
>> How can i use descriptor classes for generating mapping.xml thru which we
>> map
>> to the DB ??
>> can you please me the tool for generating mapping.xml from xml schema ?? 
>> 
>> Thanks,
>> 
>> 
>> Madhu CM wrote:
>>> Hi,
>>> Is there any tool for generating mapping.xml from xml schema ?? or do we
>>> have any option in castor ?
>>>
>>> THanks,
>>>
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Generating-Castor-Mapping-tp16717687p16719629.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