ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Utkarsh Ahuja" <ahuja.utka...@gmail.com>
Subject Re: Multiple select from external xml in a ResultMap problem
Date Wed, 28 Mar 2007 18:55:52 GMT
Hi Cihat,
Is the namespace correct for the sqlmap where you are looking for your
statement ?
Thanks
Utkarsh

--<result property="service" column="serviceCode" select="Service
.getService"/>

On 3/28/07, Cihat.altuntas <cihat.altuntas@erenetyazilim.com> wrote:
>
> Hello everyone. Could you help me about this problem.I have complex bean
> like this
>
>
> class Line{
>    private Stop firstStop;
>    private Service service;
>    //getter setter.........
> }
>
> class Stop{
>     private String a;
>     private String b;
>    //.....
> }
>
> class Service{
>     private String a;
>     private String b;
>    //.....
> }
>
> I have a resultMap like fallowing
>
> <sqlMap namespace="Line">
>
>         <resultMap id="get-completeLine" class="line">
>         <result property="lineCode" column="sLineCode"/>
>
>         <result property="firstStop" column="firstStopCode" select="
> Stop.getStop"/>
>         <result property="service" column="serviceCode" select="
> Service.getService"/>
>         <result property "lineLength" column="nHatUzunlugu"/>
> ...........................
>             </resultMap>
> </sqlMap>
>
> When I run this SqlMap error message like this
>
>  [Microsoft][ODBC SQL Server Driver]Connection is busy with results for
> another hstmt.
>
> I am looking forward your answers.
>
> There is no problem if I use only one select in this ResultMap like this
>
> <sqlMap namespace="Line">
>
>         <resultMap id="get-completeLine" class="line">
>         <result property="lineCode" column="sHatKodu"/>
>
>         <result property="firstStop" column="firstStopCode" select="
> Stop.getStop"/>
>         //Deleted select for other property bean and it works
>         <result property "lineLength" column="nHatUzunlugu"/>
> ...........................
>             </resultMap>
> </sqlMap>
>
> it works correctly now. What is the problem. I would be so pleased if
> someone could help me.
> Thanks ...
>

Mime
View raw message