Does Proveedor have getter/setter methods for documento that are of type Documento?  Like this:
 
Documento getDocumento() {}
void setDocumento(Documento documento){}
 
iBATIS 2.2.0 will only try to make a Collection if getDocumento() returns some class that implements java.util.Collection.
 
Jeff Butler

 
On 9/27/06, Pecelis, Sergio <[EMAIL PROTECTED]> wrote:
Error instantiating collection property for mapping 'documento'

I have ibatis 2.2.0

I am trying to retrieve and populate an object which itself contains
another object.

The main object is 'Proveedor', the secondary object is 'Documento'.  I
refer to the secondary object in the main resultmap by its result map
name.

The resultMap is configured as:

<sqlMap namespace="Proveedor">

<typeAlias alias="proveedor"
type="ar.com.toepfer.utils.model.Proveedor"/>
<typeAlias alias="documento"
type=" ar.com.toepfer.utils.model.Documento"/>

<cacheModel id="proveedorCache" type="LRU">
   <flushInterval hours="24"/>
   <property name="size" value="100"/>
</cacheModel>

<resultMap id="proveedorMap" class="proveedor">
       <result property="idProveedor" column="NROPRO"/>
       <result property="descripcion" column="RAZSOC"/>
       <result property="documento"
resultMap="Proveedor.documentoMap"/>
</resultMap>

<resultMap id="documentoMap" class="documento">
       <result property="nroDocumento" column="NRODOC"/>
</resultMap>

<select id="getProveedorDoc" parameterClass="proveedor"
resultMap="proveedorMap">
SELECT NROPRO, RAZSOC, NRODOC
       FROM QS36F."TG.6A1F1"
       WHERE NROPRO = #idProveedor#
</select>

</sqlMap>

___________________________________________
CONFIDENTIALITY NOTICE
This e-mail and any files and/or attachments transmitted with it are strictly confidential and intended solely for the use of the addressee. They may contain privileged and confidential information and, if you are not the intended recipient, you are hereby notified that any dissemination or copying and any use or disclosure of the information contained therein is strictly prohibited and may be illegal. If you are not the intended recipient, please notify [EMAIL PROTECTED] immediately and delete this message and any files and/or attachments thereto.

Reply via email to