ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Goodin <brandon.goo...@gmail.com>
Subject Re: Complex ResultMap
Date Thu, 10 Mar 2005 00:52:43 GMT
You will need to provide a more information. Please provide all the
sql in the sqlmap and your dao code. It might also be appropriate to
include your domain objects as well (roomData, hotelData).

Brandon


On Tue, 8 Mar 2005 15:37:34 -0000, Ryan, CatherineO
<CatherineO.Ryan@agriculture.gov.ie> wrote:
> Hi,
> 
> Could you help me the following error :
> 
> I get Cause: com.ibatis.sqlmap.client.SqlMapException: Error instantiating collection
property for mapping 'room' Cause: java.lang.ClassCastException. Do you know why this is happening?
> 
> <sqlMap namespace="HotelInfo">
> 
>         resultMap id="room" class="roomData"  >
>                 <result property="roomNumber" column="ROOM_NO" nullValue="" />
>         </resultMap>
> 
>         <resultMap id="hotel" class="hotelData"  >
>                 <result property="roomData" resultMap="HotelInfo.room"/>
>         </resultMap>
> 
>         <select id="findByPrimaryKey" resultMap="hotel" parameterClass="searchData">
>                 SQL GOES IN HERE
>         </select>
> 
> Regards
> Catherine
> 
> **********************************************************************
> ***********  Department of Agriculture and Food ***************
> 
> The information contained in this email and in any
> attachments is confidential and is designated solely
> for the attention and use of the intended recipient(s).
> This information may be subject to legal and professional
> privilege.  If you are not an intended recipient of
> this email, you must not use, disclose, copy,
> distribute or retain this message or any part of it.
> If you have received this email in error, please
> notify the sender immediately and delete all copies of
> this email from your computer system(s).
> **********************************************************************
> 
>

Mime
View raw message