Hi Quan,

How are you loading the mapping files? Make sure both mappings are
loaded, or combine them into a single file.

It appears that when you are marshalling the list, you are probably only
loading the list-mapping, and therefor the Person mapping isn't being
loaded.

Either combine them into a single file:

<mapping>
  <class name="Person">
    <description>Test class</description>
    <field name="id" type="string">
        <bind-xml name="id" node="attribute"/>
    </field>
    <field name="name" type="string"/>
    <field name="phone" type="string"/>
    <field name="email" type="string"/>
  </class>

  <class name="PersonList">
    <field name="person" type="Person" collection="vector"/>
  </class>
</mapping>

or import the person mapping into the list mapping:

<mapping>
  <import href="person-mapping.xml"/>
  <class name="PersonList">
    <field name="person" type="Person" collection="vector"/>
  </class>
</mapping>

Hope that helps.

--Keith



Pham Thanh Quan wrote:
> 
> Hi Keith,
> 
> Below is the content of my mapping files :
> 
> - person-mapping.xml
> 
> <mapping>
>   <class name="Person">
>     <description>Test class</description>
>     <field name="id" type="string">
>         <bind-xml name="id" node="attribute"/>
>     </field>
>     <field name="name" type="string"/>
>     <field name="phone" type="string"/>
>     <field name="email" type="string"/>
>   </class>
> </mapping>
> 
> - list-mapping.xml
> 
> <mapping>
>   <class name="List">
>     <field name="person" type="Person" collection="vector"/>
>   </class>
> </mapping>
> 
> Regards
> Quan
> 
> ----- Original Message -----
> From: Keith <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, August 28, 2001 12:56 PM
> Subject: Re: [castor-dev] Marshalling using castor
> 
> >
> >
> > Hi Quan,
> >
> > Are you using a mapping file, or are you relying on default
> > introspection. You might want to use a mapping file if you are not. If
> > you are already using a mapping file, can you send me you mapping so I
> > can look at it.
> >
> > Thanks,
> >
> > --Keith
> >
> > -----------------------------------------------------------
> > 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

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

Reply via email to