Hi,

I have a problem with mapping an array of objects of one Java class (Gradient), which is a field in another
class (ColorSizeSchema). The mapping for class Gradient did work. The mapping of class ColorSizeSchema failed.


Here is the corresponding example. Can anyone tell me what is wrong?

// Class ColorSizeSchema
  Gradient[] gradients = null;

  public Gradient[] getGradients() {
      return gradients;
  }

// The corresponding mapping file I created:
   <class name="Gradient">

   <class name="ColorSizeSchema">
      <map-to xml="colorSizeSchema"/>

      <field name="gradients"
             type="Gradient"
             collection="array">
          <bind-xml name="Gradient" node="element"/>
      </field>
      ...
   </class>

This threw the following exception:

Nested error: org.exolab.castor.mapping.MappingException: The return type for
method public Gradient[] ColorSizeSchema.getGradients() does not match the
declared field type java.util.Collection.




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

Reply via email to