You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by liangfei <li...@gmail.com> on 2009/06/02 08:10:53 UTC
Suggest that "resultMap" add a "ignoreNotExists" attribute.
Suggest that "resultMap" add a "ignoreNotExists" attribute:
<resultMap id="xresult" class="xclass" ignoreNotExists="true">
<result property="a" column="a" />
<result property="b" column="b" />
<result property="c" column="c" />
<result property="d" column="d" />
</resultMap>
<select id="s1" resultMap="xresult">
select a, b from x
</select>
<select id="s2" resultMap="xresult">
select a, b, c from x
</select>
Re: Suggest that "resultMap" add a "ignoreNotExists" attribute.
Posted by Larry Meadors <la...@gmail.com>.
Easy route:
<select id="s1" resultMap="xresult">
select a, b, null as c from x
</select>
If you feel really, really strongly that it is added, get the source
from svn and do so. :-)
Larry
On Thu, Jun 18, 2009 at 5:41 AM, joson yu<yu...@gmail.com> wrote:
> hi liangfei:
> i meet a situation,just like your example,i need to use the same resultmap
> with the two query. and currently ,is there any way to attain the aim.
>
> 2009/6/2 liangfei <li...@gmail.com>
>>
>> Suggest that "resultMap" add a "ignoreNotExists" attribute:
>>
>>
>>
>> <resultMap id="xresult" class="xclass" ignoreNotExists="true">
>>
>> <result property="a" column="a" />
>>
>> <result property="b" column="b" />
>>
>> <result property="c" column="c" />
>>
>> <result property="d" column="d" />
>>
>> </resultMap>
>>
>>
>>
>> <select id="s1" resultMap="xresult">
>>
>> select a, b from x
>>
>> </select>
>>
>>
>>
>> <select id="s2" resultMap="xresult">
>>
>> select a, b, c from x
>>
>> </select>
>>
>>
>
Re: Suggest that "resultMap" add a "ignoreNotExists" attribute.
Posted by joson yu <yu...@gmail.com>.
hi liangfei:
i meet a situation,just like your example,i need to use the same resultmap
with the two query. and currently ,is there any way to attain the aim.
2009/6/2 liangfei <li...@gmail.com>
> Suggest that "resultMap" add a "ignoreNotExists" attribute:
>
>
>
> <resultMap id="xresult" class="xclass" ignoreNotExists="true">
>
> <result property="a" column="a" />
>
> <result property="b" column="b" />
>
> <result property="c" column="c" />
>
> <result property="d" column="d" />
>
> </resultMap>
>
>
>
> <select id="s1" resultMap="xresult">
>
> select a, b from x
>
> </select>
>
>
>
> <select id="s2" resultMap="xresult">
>
> select a, b, c from x
>
> </select>
>
>
>