ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Meindert" <meind...@pastelebusiness.com>
Subject RE: Problem in using complex objects in ibatis2.0
Date Mon, 13 Mar 2006 09:36:25 GMT
Did look at your properties names? If the second letter is a capital then
the first letter of the property is also a capital;

 

getPostalCode, setPostalCode => Property name = postalCode

getDOB, setDOB => Property Name = DOB

getWistVO, setWHistVO => WHistVO

 

 

 

MEINDERT HOVING



From: Nikesh, Kishlay [mailto:kishlay.nikesh@fidelity.co.in] 
Sent: 13 March 2006 11:21 AM
To: user-java@ibatis.apache.org
Subject: 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(GenericPr
obe.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.


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 10/03/2006



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 10/03/2006
 

Mime
View raw message