You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Tuomo Lesonen (JIRA)" <ji...@apache.org> on 2006/01/24 12:19:48 UTC

[jira] Created: (COCOON-1740) Modular DatabaseSelectAction incorrectly handles multiple rows

Modular DatabaseSelectAction incorrectly handles multiple rows
--------------------------------------------------------------

         Key: COCOON-1740
         URL: http://issues.apache.org/jira/browse/COCOON-1740
     Project: Cocoon
        Type: Bug
  Components: Blocks: Databases  
    Versions: 2.1.8, 2.2-dev (Current SVN), 2.1.9-dev (current SVN)    
    Reporter: Tuomo Lesonen
    Priority: Minor
 Attachments: DatabaseAction.java, DatabaseSelectAction.java

When one needs to select multiple rows from a table, and the keys used to identify the rows vary, for example when request-param inputmodule is used with parameter-value of  "id[*]", the outputted parameters are not unique. For example, when there are 3 different variations of the keys, and every variation returns a single row, the following is outputted:

==> row #0

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]

==> row #1

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]

==> row #2

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]

What happens is that on every row the names of the previous output-parameters from the value-fields (in descriptor) are overwritten with the new names, since the index is always forced back to zero.

Because of this, the values from matching rows cannot be "forwarded" to other actions for additional processing (ie. DatabaseDeleteAction).

The correct output should be:

==> row #0

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]

==> row #1

o.a.c.components.modules.output.OutputModule:user.id[1]
o.a.c.components.modules.output.OutputModule:user.username[1]
o.a.c.components.modules.output.OutputModule:user.password[1]

==> row #2

o.a.c.components.modules.output.OutputModule:user.id[2]
o.a.c.components.modules.output.OutputModule:user.username[2]
o.a.c.components.modules.output.OutputModule:user.password[2]

The only way this output can be achieved is when the keys do not vary, and multiple rows are returned. But this is not always the case, as the example above demonstrates.

Here's the descriptor-snippet from the previous example:

 <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>

I have fixed this by adding a class variable "sumIndex" to DatabaseAction.java, which is incremented in DatabaseSelectAction.java in method "processRow". sumIndex is then used to produce unique names for the output-parameters. Finally sumIndex contains the total rows selected.

Patched files (2) attached.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (COCOON-1740) Modular DatabaseSelectAction incorrectly handles multiple rows

Posted by "Jörg Heinicke (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COCOON-1740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörg Heinicke updated COCOON-1740:
----------------------------------

    Status: Continued  (was: On Hold)

Missing test case isn't really a reason for on hold.

> Modular DatabaseSelectAction incorrectly handles multiple rows
> --------------------------------------------------------------
>
>                 Key: COCOON-1740
>                 URL: https://issues.apache.org/jira/browse/COCOON-1740
>             Project: Cocoon
>          Issue Type: Bug
>          Components: Blocks: Databases
>    Affects Versions: 2.1.8, 2.1.9, 2.2
>            Reporter: Tuomo Lesonen
>            Priority: Minor
>         Attachments: 20060310-cocoon-databases, DatabaseAction.java, DatabaseSelectAction.java
>
>
> When one needs to select multiple rows from a table, and the keys used to identify the rows vary, for example when request-param inputmodule is used with parameter-value of  "id[*]", the outputted parameters are not unique. For example, when there are 3 different variations of the keys, and every variation returns a single row, the following is outputted:
> ==> row #0
> 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]
> ==> row #1
> 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]
> ==> row #2
> 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]
> What happens is that on every row the names of the previous output-parameters from the value-fields (in descriptor) are overwritten with the new names, since the index is always forced back to zero.
> Because of this, the values from matching rows cannot be "forwarded" to other actions for additional processing (ie. DatabaseDeleteAction).
> The correct output should be:
> ==> row #0
> 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]
> ==> row #1
> o.a.c.components.modules.output.OutputModule:user.id[1]
> o.a.c.components.modules.output.OutputModule:user.username[1]
> o.a.c.components.modules.output.OutputModule:user.password[1]
> ==> row #2
> o.a.c.components.modules.output.OutputModule:user.id[2]
> o.a.c.components.modules.output.OutputModule:user.username[2]
> o.a.c.components.modules.output.OutputModule:user.password[2]
> The only way this output can be achieved is when the keys do not vary, and multiple rows are returned. But this is not always the case, as the example above demonstrates.
> Here's the descriptor-snippet from the previous example:
>  <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>
> I have fixed this by adding a class variable "sumIndex" to DatabaseAction.java, which is incremented in DatabaseSelectAction.java in method "processRow". sumIndex is then used to produce unique names for the output-parameters. Finally sumIndex contains the total rows selected.
> Patched files (2) attached.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COCOON-1740) Modular DatabaseSelectAction incorrectly handles multiple rows

Posted by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/COCOON-1740?page=all ]

Jean-Baptiste Quenot updated COCOON-1740:
-----------------------------------------

    Attachment: 20060310-cocoon-databases

I made a patch from the two classes.  Please never reindent code when submitting a contribution.

> Modular DatabaseSelectAction incorrectly handles multiple rows
> --------------------------------------------------------------
>
>          Key: COCOON-1740
>          URL: http://issues.apache.org/jira/browse/COCOON-1740
>      Project: Cocoon
>         Type: Bug
>   Components: Blocks: Databases
>     Versions: 2.1.8, 2.2-dev (Current SVN), 2.1.9-dev (current SVN)
>     Reporter: Tuomo Lesonen
>     Assignee: Jean-Baptiste Quenot
>     Priority: Minor
>  Attachments: 20060310-cocoon-databases, DatabaseAction.java, DatabaseSelectAction.java
>
> When one needs to select multiple rows from a table, and the keys used to identify the rows vary, for example when request-param inputmodule is used with parameter-value of  "id[*]", the outputted parameters are not unique. For example, when there are 3 different variations of the keys, and every variation returns a single row, the following is outputted:
> ==> row #0
> 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]
> ==> row #1
> 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]
> ==> row #2
> 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]
> What happens is that on every row the names of the previous output-parameters from the value-fields (in descriptor) are overwritten with the new names, since the index is always forced back to zero.
> Because of this, the values from matching rows cannot be "forwarded" to other actions for additional processing (ie. DatabaseDeleteAction).
> The correct output should be:
> ==> row #0
> 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]
> ==> row #1
> o.a.c.components.modules.output.OutputModule:user.id[1]
> o.a.c.components.modules.output.OutputModule:user.username[1]
> o.a.c.components.modules.output.OutputModule:user.password[1]
> ==> row #2
> o.a.c.components.modules.output.OutputModule:user.id[2]
> o.a.c.components.modules.output.OutputModule:user.username[2]
> o.a.c.components.modules.output.OutputModule:user.password[2]
> The only way this output can be achieved is when the keys do not vary, and multiple rows are returned. But this is not always the case, as the example above demonstrates.
> Here's the descriptor-snippet from the previous example:
>  <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>
> I have fixed this by adding a class variable "sumIndex" to DatabaseAction.java, which is incremented in DatabaseSelectAction.java in method "processRow". sumIndex is then used to produce unique names for the output-parameters. Finally sumIndex contains the total rows selected.
> Patched files (2) attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (COCOON-1740) Modular DatabaseSelectAction incorrectly handles multiple rows

Posted by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/COCOON-1740?page=all ]

Jean-Baptiste Quenot reassigned COCOON-1740:
--------------------------------------------

    Assign To: Jean-Baptiste Quenot

> Modular DatabaseSelectAction incorrectly handles multiple rows
> --------------------------------------------------------------
>
>          Key: COCOON-1740
>          URL: http://issues.apache.org/jira/browse/COCOON-1740
>      Project: Cocoon
>         Type: Bug
>   Components: Blocks: Databases
>     Versions: 2.1.8, 2.2-dev (Current SVN), 2.1.9-dev (current SVN)
>     Reporter: Tuomo Lesonen
>     Assignee: Jean-Baptiste Quenot
>     Priority: Minor
>  Attachments: DatabaseAction.java, DatabaseSelectAction.java
>
> When one needs to select multiple rows from a table, and the keys used to identify the rows vary, for example when request-param inputmodule is used with parameter-value of  "id[*]", the outputted parameters are not unique. For example, when there are 3 different variations of the keys, and every variation returns a single row, the following is outputted:
> ==> row #0
> 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]
> ==> row #1
> 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]
> ==> row #2
> 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]
> What happens is that on every row the names of the previous output-parameters from the value-fields (in descriptor) are overwritten with the new names, since the index is always forced back to zero.
> Because of this, the values from matching rows cannot be "forwarded" to other actions for additional processing (ie. DatabaseDeleteAction).
> The correct output should be:
> ==> row #0
> 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]
> ==> row #1
> o.a.c.components.modules.output.OutputModule:user.id[1]
> o.a.c.components.modules.output.OutputModule:user.username[1]
> o.a.c.components.modules.output.OutputModule:user.password[1]
> ==> row #2
> o.a.c.components.modules.output.OutputModule:user.id[2]
> o.a.c.components.modules.output.OutputModule:user.username[2]
> o.a.c.components.modules.output.OutputModule:user.password[2]
> The only way this output can be achieved is when the keys do not vary, and multiple rows are returned. But this is not always the case, as the example above demonstrates.
> Here's the descriptor-snippet from the previous example:
>  <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>
> I have fixed this by adding a class variable "sumIndex" to DatabaseAction.java, which is incremented in DatabaseSelectAction.java in method "processRow". sumIndex is then used to produce unique names for the output-parameters. Finally sumIndex contains the total rows selected.
> Patched files (2) attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (COCOON-1740) Modular DatabaseSelectAction incorrectly handles multiple rows

Posted by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/COCOON-1740?page=all ]

Jean-Baptiste Quenot updated COCOON-1740:
-----------------------------------------


Could you please provide a testcase?  I can't find anything in the samples.

> Modular DatabaseSelectAction incorrectly handles multiple rows
> --------------------------------------------------------------
>
>          Key: COCOON-1740
>          URL: http://issues.apache.org/jira/browse/COCOON-1740
>      Project: Cocoon
>         Type: Bug
>   Components: Blocks: Databases
>     Versions: 2.1.8, 2.2-dev (Current SVN), 2.1.9-dev (current SVN)
>     Reporter: Tuomo Lesonen
>     Assignee: Jean-Baptiste Quenot
>     Priority: Minor
>  Attachments: 20060310-cocoon-databases, DatabaseAction.java, DatabaseSelectAction.java
>
> When one needs to select multiple rows from a table, and the keys used to identify the rows vary, for example when request-param inputmodule is used with parameter-value of  "id[*]", the outputted parameters are not unique. For example, when there are 3 different variations of the keys, and every variation returns a single row, the following is outputted:
> ==> row #0
> 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]
> ==> row #1
> 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]
> ==> row #2
> 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]
> What happens is that on every row the names of the previous output-parameters from the value-fields (in descriptor) are overwritten with the new names, since the index is always forced back to zero.
> Because of this, the values from matching rows cannot be "forwarded" to other actions for additional processing (ie. DatabaseDeleteAction).
> The correct output should be:
> ==> row #0
> 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]
> ==> row #1
> o.a.c.components.modules.output.OutputModule:user.id[1]
> o.a.c.components.modules.output.OutputModule:user.username[1]
> o.a.c.components.modules.output.OutputModule:user.password[1]
> ==> row #2
> o.a.c.components.modules.output.OutputModule:user.id[2]
> o.a.c.components.modules.output.OutputModule:user.username[2]
> o.a.c.components.modules.output.OutputModule:user.password[2]
> The only way this output can be achieved is when the keys do not vary, and multiple rows are returned. But this is not always the case, as the example above demonstrates.
> Here's the descriptor-snippet from the previous example:
>  <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>
> I have fixed this by adding a class variable "sumIndex" to DatabaseAction.java, which is incremented in DatabaseSelectAction.java in method "processRow". sumIndex is then used to produce unique names for the output-parameters. Finally sumIndex contains the total rows selected.
> Patched files (2) attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (COCOON-1740) Modular DatabaseSelectAction incorrectly handles multiple rows

Posted by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/COCOON-1740?page=all ]

Jean-Baptiste Quenot reassigned COCOON-1740:
--------------------------------------------

    Assignee:     (was: Jean-Baptiste Quenot)

> Modular DatabaseSelectAction incorrectly handles multiple rows
> --------------------------------------------------------------
>
>                 Key: COCOON-1740
>                 URL: http://issues.apache.org/jira/browse/COCOON-1740
>             Project: Cocoon
>          Issue Type: Bug
>          Components: Blocks: Databases
>    Affects Versions: 2.1.8, 2.2-dev (Current SVN), 2.1.9
>            Reporter: Tuomo Lesonen
>            Priority: Minor
>         Attachments: 20060310-cocoon-databases, DatabaseAction.java, DatabaseSelectAction.java
>
>
> When one needs to select multiple rows from a table, and the keys used to identify the rows vary, for example when request-param inputmodule is used with parameter-value of  "id[*]", the outputted parameters are not unique. For example, when there are 3 different variations of the keys, and every variation returns a single row, the following is outputted:
> ==> row #0
> 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]
> ==> row #1
> 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]
> ==> row #2
> 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]
> What happens is that on every row the names of the previous output-parameters from the value-fields (in descriptor) are overwritten with the new names, since the index is always forced back to zero.
> Because of this, the values from matching rows cannot be "forwarded" to other actions for additional processing (ie. DatabaseDeleteAction).
> The correct output should be:
> ==> row #0
> 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]
> ==> row #1
> o.a.c.components.modules.output.OutputModule:user.id[1]
> o.a.c.components.modules.output.OutputModule:user.username[1]
> o.a.c.components.modules.output.OutputModule:user.password[1]
> ==> row #2
> o.a.c.components.modules.output.OutputModule:user.id[2]
> o.a.c.components.modules.output.OutputModule:user.username[2]
> o.a.c.components.modules.output.OutputModule:user.password[2]
> The only way this output can be achieved is when the keys do not vary, and multiple rows are returned. But this is not always the case, as the example above demonstrates.
> Here's the descriptor-snippet from the previous example:
>  <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>
> I have fixed this by adding a class variable "sumIndex" to DatabaseAction.java, which is incremented in DatabaseSelectAction.java in method "processRow". sumIndex is then used to produce unique names for the output-parameters. Finally sumIndex contains the total rows selected.
> Patched files (2) attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (COCOON-1740) Modular DatabaseSelectAction incorrectly handles multiple rows

Posted by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/COCOON-1740?page=comments#action_12367225 ] 

Jean-Baptiste Quenot commented on COCOON-1740:
----------------------------------------------

Can you please provide a *patch*, obtained using "svn diff" against a recent checkout of branch 2.1?  That will help to fix this bug in a timely manner.  Thanks in advance!

> Modular DatabaseSelectAction incorrectly handles multiple rows
> --------------------------------------------------------------
>
>          Key: COCOON-1740
>          URL: http://issues.apache.org/jira/browse/COCOON-1740
>      Project: Cocoon
>         Type: Bug
>   Components: Blocks: Databases
>     Versions: 2.1.8, 2.2-dev (Current SVN), 2.1.9-dev (current SVN)
>     Reporter: Tuomo Lesonen
>     Assignee: Jean-Baptiste Quenot
>     Priority: Minor
>  Attachments: DatabaseAction.java, DatabaseSelectAction.java
>
> When one needs to select multiple rows from a table, and the keys used to identify the rows vary, for example when request-param inputmodule is used with parameter-value of  "id[*]", the outputted parameters are not unique. For example, when there are 3 different variations of the keys, and every variation returns a single row, the following is outputted:
> ==> row #0
> 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]
> ==> row #1
> 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]
> ==> row #2
> 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]
> What happens is that on every row the names of the previous output-parameters from the value-fields (in descriptor) are overwritten with the new names, since the index is always forced back to zero.
> Because of this, the values from matching rows cannot be "forwarded" to other actions for additional processing (ie. DatabaseDeleteAction).
> The correct output should be:
> ==> row #0
> 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]
> ==> row #1
> o.a.c.components.modules.output.OutputModule:user.id[1]
> o.a.c.components.modules.output.OutputModule:user.username[1]
> o.a.c.components.modules.output.OutputModule:user.password[1]
> ==> row #2
> o.a.c.components.modules.output.OutputModule:user.id[2]
> o.a.c.components.modules.output.OutputModule:user.username[2]
> o.a.c.components.modules.output.OutputModule:user.password[2]
> The only way this output can be achieved is when the keys do not vary, and multiple rows are returned. But this is not always the case, as the example above demonstrates.
> Here's the descriptor-snippet from the previous example:
>  <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>
> I have fixed this by adding a class variable "sumIndex" to DatabaseAction.java, which is incremented in DatabaseSelectAction.java in method "processRow". sumIndex is then used to produce unique names for the output-parameters. Finally sumIndex contains the total rows selected.
> Patched files (2) attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira