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 Niels Beekman <n....@wis.nl> on 2006/10/27 11:44:57 UTC
RE: how to iterate a property of array of objects and using isEqual tag to compare an attribute ex:(id) of this object with a value. ex: "list[].id"
Please keep discussions on the list.
________________________________
From: marc khoury [mailto:mcontek@gmail.com]
Sent: vrijdag 27 oktober 2006 9:22
To: <snip>
Subject: Re: how to iterate a property of array of objects and using
isEqual tag to compare an attribute ex:(id) of this object with a value.
ex: "list[].id"
On 10/27/06, marc khoury <mc...@gmail.com> wrote:
Hi i am a member of the jira-users
and i have the following problem so please help me:
<iterate property="list">
<isEqual property="list[].id" compareValue="123">
$list[].anotherProperty$
</isEqual>
</iterate>
after running my query in ibatis that contains this mentioned part of
it, i get an error on reading the property "list[].id" .
it seems like ibatis can not read or iterate with each object inside the
property of type collection to get to a specific attribute like "id" in
my case.
So is there any solution to it, or a differente writing of the
property="..." inside the isEqual tag that i should follow to make it
right. Please reply to me with the format of the iterate tag along with
the isEqual tag in writing.
Thank u regards,
Marc Khoury
RE: how to iterate a property of array of objects and using isEqual tag to compare an attribute ex:(id) of this object with a value. ex: "list[].id"
Posted by Poitras Christian <Ch...@ircm.qc.ca>.
What version of iBATIS are you using?
Christian
________________________________
From: Niels Beekman [mailto:n.beekman@wis.nl]
Sent: Friday, 27 October 2006 05:45
To: user-java@ibatis.apache.org
Subject: RE: how to iterate a property of array of objects and using
isEqual tag to compare an attribute ex:(id) of this object with a value.
ex: "list[].id"
Please keep discussions on the list.
________________________________
From: marc khoury [mailto:mcontek@gmail.com]
Sent: vrijdag 27 oktober 2006 9:22
To: <snip>
Subject: Re: how to iterate a property of array of objects and using
isEqual tag to compare an attribute ex:(id) of this object with a value.
ex: "list[].id"
On 10/27/06, marc khoury <mc...@gmail.com> wrote:
Hi i am a member of the jira-users
and i have the following problem so please help me:
<iterate property="list">
<isEqual property="list[].id" compareValue="123">
$list[].anotherProperty$
</isEqual>
</iterate>
after running my query in ibatis that contains this mentioned part of
it, i get an error on reading the property "list[].id" .
it seems like ibatis can not read or iterate with each object inside the
property of type collection to get to a specific attribute like "id" in
my case.
So is there any solution to it, or a differente writing of the
property="..." inside the isEqual tag that i should follow to make it
right. Please reply to me with the format of the iterate tag along with
the isEqual tag in writing.
Thank u regards,
Marc Khoury