Hello,
I wrote a patch for modular DatabaseAction.java and
DatabaseSelectAction.java in the databases-block. The select-action now
increments the value-columns also, which allows to select multiple rows
inside a table.
Where can I send the files for verification?
-Tuomo
On Mon, 23 Jan 2006, Tuomo L wrote:
> Hi,
>
> I need to select all "username" and "password" -columns of specific users.
> Here's a simple configuration:
>
> <table name="user">
> <keys>
> <key name="id" type="int" set="master">
> <mode name="request-param" parameter="id*" type="all"/>
> </key>
> </keys>
> <values>
> <value name="username" type="string"/>
> <value name="password" type="string"/>
> </values>
> </table>
>
> The request-attributes should now contain the usernames and passwords, but
> only one set of them is returned. According to logs, the DatabaseAction-class
> is not incrementing the rowIndex for the value-columns, only for the
> key-columns. So, I get attributes like:
>
> o.a.c.components.modules.output.OutputModule:user.id[0]
> o.a.c.components.modules.output.OutputModule:user.username[0]
> o.a.c.components.modules.output.OutputModule:user.password[0]
>
> o.a.c.components.modules.output.OutputModule:user.id[1]
> o.a.c.components.modules.output.OutputModule:user.username[0]
> o.a.c.components.modules.output.OutputModule:user.password[0]
>
> o.a.c.components.modules.output.OutputModule:user.id[2]
> o.a.c.components.modules.output.OutputModule:user.username[0]
> o.a.c.components.modules.output.OutputModule:user.password[0]
>
> Why isn't the rowIndex icremented for the value-columns? Is this a bug or a
> "feature"? As this, one cannot select multiple rows with this action, because
> the value-columns are overwritten on every row with index 0.
>
> Any ideas?
>
> -Tuomo
>
|