Hi,

castor is great. Thanks!

I used the SourceGenerator to create Javacode from my Schema-definition.
The only time castor creates a java-class for a simple type is when
the enumeration-facet occurs. Is there an easy way to use this generated type 
in a JDO mapping (mapping.xml)? Castor complains about a missing convertor.

example (Schemadefinition):
<xsd:element name="foo" minOccurs="1" maxOccurs="1">
  <xsd:simpleType base="xsd:string">
     <xsd:restriction>
       <xsd:enumeration value="a"/>
       <xsd:enumeration value="b"/>
     </xsd:restriction>
  </xsd:simpleType>
</xsd:element>

-> this creates a class called fooType.

my mapping.xml:

...
  <field name="foo" type="fooType">
   <sql name="foo" type="varchar"/>
  </field>
...

-> Exception thrown: 
 Exception e Nested error: org.exolab.castor.mapping.MappingException: 
  No convertor exists for converting type java.lang.String to type fooType

IMHO automatic conversion of the enumeration facet would be nice.
Any response would be appreciated.

Thanks and regards,
   Thomas Klute

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to