Title: Problem in using complex objects in ibatis2.0

Hi,

I am having a java-class(getter/setter) which has a reference of another java class in it.

public class universeVO implements Serializable
{      
        private int universeid;
        private String description;
        private weightingHistoryVO wHistVO;
}

Each universeId in the above class can have multiple weightingHistoryVOs.

I have used the following entries in my Universe.xml file :-

  <typeAlias alias="universe" type="com.asset.universeVO"/>
  <typeAlias alias="weight" type="com.asset.weightingHistoryVO"/>

  <resultMap id="getUniverseResult" class="universe">
        <result property="universeid" column="UniverseId" />
        <result property="wHistVO.universeid" column="UniverseId" />
  </resultMap>
  <statement id="getAllUniverse" parameterClass="int" resultMap="getUniverseResult">
        SELECT * from aaUniverse, aaWeightingHistory WHERE
                aaUniverse.UniverseId=aaWeightingHistory.UniverseId
                AND aaUniverse.UniverseId = #universeid#
  </statement>

The above code when used gives me this error on WAS/Sybase environment -

Caused by:
com.ibatis.common.beans.ProbeException: There is no WRITEABLE property named 'wHistVO' in class 'com.asset.universeVO'
        at com.ibatis.common.beans.ClassInfo.getSetterType(ClassInfo.java:174)
        at com.ibatis.common.beans.GenericProbe.getClassPropertyTypeForSetter(GenericProbe.java:250)

Can anyone please advice what could be the problem ?

Many Thanks,
Kishlay Kumar Nikesh

Important: Any comments or statements made in this email are not necessarily those of Fidelity Business Services India Pvt. Ltd. or any of the Fidelity group companies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. if you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Fidelity Business Services India Pvt. Ltd. may be subject to our monitoring procedures.

Reply via email to