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 Kyunam Kim <ky...@esri.com> on 2008/09/05 20:04:23 UTC
possible to use isEqual inside iterate tag?
Hi all,
When iterating a list of my pojos, I'd like to examine a property of
each pojo using <isEqual/> like
SELECT
<dynamic>
<isPropertyAvailable property="return_columns">
<iterate property="return_columns" conjunction=",">
<isEqual property="isValid" compareValue="false">
$HOW DO I ACCESS A CURRENT ELEMENT'S PROPERTY HERE?$
</isEqual>
</iterate>
</isPropertyAvailable>
</dynamic>
FROM
$table_name$
Would this be possible scenario?
If yes, could you tell me the exact syntax to use to access a property
of each element while inside <iterate/>?
Thanks,
Q
RE: possible to use isEqual inside iterate tag?
Posted by Kyunam Kim <ky...@esri.com>.
Thanks Jeff.
I thought I tried that many times and it didn't work on me
(NumberFormatException...) Maybe I brainfarted.
Your solution works!!
Thanks again.
Q
-----Original Message-----
From: Jeff Butler [mailto:jeffgbutler@gmail.com]
Sent: Friday, September 05, 2008 11:14 AM
To: user-java@ibatis.apache.org
Subject: Re: possible to use isEqual inside iterate tag?
SELECT
<dynamic>
<isPropertyAvailable property="return_columns">
<iterate property="return_columns" conjunction=",">
<isEqual property="return_columns[].isValid"
compareValue="false">
#return_columns[].someProperty#
</isEqual>
</iterate>
</isPropertyAvailable>
</dynamic>
FROM
$table_name$
Jeff Butler
On Fri, Sep 5, 2008 at 1:04 PM, Kyunam Kim <ky...@esri.com> wrote:
>
> Hi all,
>
>
>
> When iterating a list of my pojos, I'd like to examine a property of
each pojo using <isEqual/> like
>
>
>
> SELECT
>
> <dynamic>
>
> <isPropertyAvailable property="return_columns">
>
> <iterate property="return_columns" conjunction=",">
>
> <isEqual property="isValid" compareValue="false">
>
> $HOW DO I ACCESS A CURRENT ELEMENT'S PROPERTY HERE?$
>
> </isEqual>
>
> </iterate>
>
> </isPropertyAvailable>
>
> </dynamic>
>
> FROM
>
> $table_name$
>
>
>
> Would this be possible scenario?
>
> If yes, could you tell me the exact syntax to use to access a property
of each element while inside <iterate/>?
>
>
>
> Thanks,
>
> Q
>
>
Re: possible to use isEqual inside iterate tag?
Posted by Jeff Butler <je...@gmail.com>.
SELECT
<dynamic>
<isPropertyAvailable property="return_columns">
<iterate property="return_columns" conjunction=",">
<isEqual property="return_columns[].isValid" compareValue="false">
#return_columns[].someProperty#
</isEqual>
</iterate>
</isPropertyAvailable>
</dynamic>
FROM
$table_name$
Jeff Butler
On Fri, Sep 5, 2008 at 1:04 PM, Kyunam Kim <ky...@esri.com> wrote:
>
> Hi all,
>
>
>
> When iterating a list of my pojos, I'd like to examine a property of each pojo using <isEqual/> like
>
>
>
> SELECT
>
> <dynamic>
>
> <isPropertyAvailable property="return_columns">
>
> <iterate property="return_columns" conjunction=",">
>
> <isEqual property="isValid" compareValue="false">
>
> $HOW DO I ACCESS A CURRENT ELEMENT'S PROPERTY HERE?$
>
> </isEqual>
>
> </iterate>
>
> </isPropertyAvailable>
>
> </dynamic>
>
> FROM
>
> $table_name$
>
>
>
> Would this be possible scenario?
>
> If yes, could you tell me the exact syntax to use to access a property of each element while inside <iterate/>?
>
>
>
> Thanks,
>
> Q
>
>