Not right now. As it stands, the Castor XML code generator creates the
following artifacts from an XML schema:

a) domain classes
b) (XML) descriptor classes, describing the binding between XML and Java

Alternatively, you can generate a mapping file instead, but this will
only cover the XML side of things. The idea would be to augment the
mapping file with JDO-specific entries.

Having said that, I am currently working on extending the XML code
generator to be able to emit JDO descriptor classes as well, based upon
<appInfo> elements in your XML schema (or a separate binding file). I
would like to see this finished by the end of June (latest).

Werner

Madhu CM wrote:
> 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
>>
>>
>>
>>
> 


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

    http://xircles.codehaus.org/manage_email


Reply via email to