ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Poitras Christian" <Christian.Poit...@ircm.qc.ca>
Subject RE: dynamic tables names in query problem
Date Mon, 25 Sep 2006 14:54:22 GMT
The reason "value[]" doesn't work is because someone may want to write
something like this.

Object MyObject having a property "values" which is a List of MyObjects.

Then the iterate tag would be confused in front of a line like this.
<iterate property="values">
  some sql #values[]#
</iterate>
Ouch....
I know it's unlikely to happen, but is still possible.

So the [] indicates the property currently processed in the iterate tag.

Another example :
<iterate property="someProperty">
#[].someName[1]#
</iterate>
This would access a property someProperty[i].someName[1]

Christian

-----Original Message-----
From: Eugeny N Dzhurinsky [mailto:bofh@redwerk.com] 
Sent: Tuesday, 19 September 2006 11:04
To: user-java@ibatis.apache.org
Subject: Re: dynamic tables names in query problem

On Tue, Sep 19, 2006 at 03:56:43PM +0200, Niels Beekman wrote:
> Try using $value[]$ or maybe $[]$.
> Using #'s is probably not going to work, since most databases do not 
> support dynamic tablenames.

The $[]$ solved problem, but $value[]$ doesn't work for some reason.

--
Eugene N Dzhurinsky


Mime
View raw message