ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sundar Sankar" <fatboys...@gmail.com>
Subject Re: Interesting Logger Bug
Date Sun, 20 Jul 2008 17:09:49 GMT
Has any body noticed this behaviour? Is there a solution for this?

On Thu, Jul 17, 2008 at 4:12 PM, Sundar Sankar <fatboysuns@gmail.com> wrote:

> Hi,
>      I happened to notice this pattern of logging that Ibatis was defecting
> on.I am surprised it hasnt been mentioned earlier. Anyways, this is the
> situation, Say you are calling a procedure that returns a ref-cursor. Your
> resultMap for the refcursor is something like this
> <resultMap id="map1" class="class1" groupBy="prop1">
>         <result property="prop1" column="COL1" />
>         <result property="prop2" resultMap="map2"/>
>     </resultMap>
>     <resultMap id="map2" class="class2" groupBy="prop3">
>         <result property="prop3" column="COL3" />
>         <result property="prop4" column="COL4" />
>         <result property="prop5" column="COL5"/>
>     </resultMap>
> If there was any problem in setting map2, say the propertyname was wrong,
> column name was wrong, the type of property isnt right etc or any mistake
> for that matter, The only exception Ibatis throws is
> --- Cause: com.ibatis.sqlmap.client.SqlMapException: There is no result map
> named map2 in this SqlMap.
> The only way to figure out the error is to make the resultset directly
> referece map2. If we have the single resultMap in the file, then Ibatis
> exactly points to which property has a problem and what the problem is.
> Otherwise it doesnt seem to be able to find out issues in the map2.
> -Sundar

View raw message