The CVS version (I believe any tag after tag_0_9_3_17) of Castor
supports the transient keyword on the bind-xml element. Which allows you
to make fields transient for XML and valid only for SQL, however I don't
think the <sql> element has this feature.


I noticed you use <xml>, which still works, but xml is not a valid
element name according to the XML specification, so this element has
been changed a while back to <bind-xml>. 

--Keith


"Peter T. Brown" wrote:
> 
> Is there a way to have some fields map to SQL and XML bindings, but have others map 
>only to XML bindings? An example is below. When I try the example, however, I keep 
>getting a java.lang.ClassCastException: 
>org.exolab.castor.mapping.loader.FieldDescriptorImpl...
> 
> Thanks
> 
>         <class name="blah" identity="ID" key-generator="SEQUENCE"  access="shared">
>                 <!-- cache-type type="none"/ -->
>                 <cache-type type="count-limited" size="1000"/>
>                 <description>blah</description>
>                 <map-to table="blah" xml="blah"/>
>                 <field name="ID" type="integer">
>                         <sql name="ID" type="integer"/>
>                         <xml name="ID" node="attribute"/>
>                 </field>
>                 <field name="Updated" type="date">
>                         <sql name="Updated" type="timestamp"/>
>                         <xml name="Updated" node="element"/>
>                 </field>
>                 <field name="Author" type="string">
>                         <sql name="Author" type="varchar"/>
>                         <xml name="Author" node="element"/>
>                 </field>
>                 <field name="Name" type="string">
>                         <sql name="Name" type="varchar"/>
>                         <xml name="Name" node="element"/>
>                 </field>
>                 <field name="Path" type="string">
>                         <xml name="Path" node="element"/>
>                 </field>
>         </class>
> 
> -----------------------------------------------------------
> 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

Reply via email to