You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Kristian Koehler (JIRA)" <ji...@apache.org> on 2007/01/11 11:30:48 UTC

[jira] Created: (SM-813) [patch] Unique Column Names for JdbcComponent

[patch] Unique Column Names for JdbcComponent
---------------------------------------------

                 Key: SM-813
                 URL: https://issues.apache.org/activemq/browse/SM-813
             Project: ServiceMix
          Issue Type: Bug
          Components: servicemix-components
            Reporter: Kristian Koehler
         Attachments: patch.txt

HI 

using the JdbcComponent with a SQL Statement returing a ResultSet with two or more equal columnnames results in an invalid XML document.

Example:

SQL Statement

SELECT * FROM TABLE1, TABLE2 WHERE TABLE1.ID = TABLE2.ID

Resulting XML:

--- 8< ---

<sqlResults>
  <resultSet>
   <row id="1" id="1"/>
...

--- 8< ---

The column Names in this example are not unique.
The attached patch solves this issue.

The resulting document would look like this:

--- 8< ---

<sqlResults>
  <resultSet>
   <row id="1" id_1="1"/>
...

--- 8< ---


Test Case available.

Kristian

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

        

[jira] Resolved: (SM-813) [patch] Unique Column Names for JdbcComponent

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved SM-813.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 3.1
         Assignee: Guillaume Nodet

Author: gnodet
Date: Thu Jan 11 09:35:41 2007
New Revision: 495303

URL: http://svn.apache.org/viewvc?view=rev&rev=495303
Log:
SM-813: Unique Column Names for JdbcComponent
Patch provided by Kristian Koehler

Added:
   incubator/servicemix/trunk/common/servicemix-components/src/test/java/org/apache/servicemix/components/jdbc/
   incubator/servicemix/trunk/common/servicemix-components/src/test/java/org/apache/servicemix/components/jdbc/JdbcComponentUniqueNamesTest.java   (with props)
Modified:
   incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/jdbc/JdbcComponent.java


> [patch] Unique Column Names for JdbcComponent
> ---------------------------------------------
>
>                 Key: SM-813
>                 URL: https://issues.apache.org/activemq/browse/SM-813
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-components
>            Reporter: Kristian Koehler
>         Assigned To: Guillaume Nodet
>             Fix For: 3.1
>
>         Attachments: patch.txt
>
>
> HI 
> using the JdbcComponent with a SQL Statement returing a ResultSet with two or more equal columnnames results in an invalid XML document.
> Example:
> SQL Statement
> SELECT * FROM TABLE1, TABLE2 WHERE TABLE1.ID = TABLE2.ID
> Resulting XML:
> --- 8< ---
> <sqlResults>
>   <resultSet>
>    <row id="1" id="1"/>
> ...
> --- 8< ---
> The column Names in this example are not unique.
> The attached patch solves this issue.
> The resulting document would look like this:
> --- 8< ---
> <sqlResults>
>   <resultSet>
>    <row id="1" id_1="1"/>
> ...
> --- 8< ---
> Test Case available.
> Kristian

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

        

[jira] Updated: (SM-813) [patch] Unique Column Names for JdbcComponent

Posted by "Kristian Koehler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Koehler updated SM-813:
--------------------------------

    Attachment: patch.txt

> [patch] Unique Column Names for JdbcComponent
> ---------------------------------------------
>
>                 Key: SM-813
>                 URL: https://issues.apache.org/activemq/browse/SM-813
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-components
>            Reporter: Kristian Koehler
>         Attachments: patch.txt
>
>
> HI 
> using the JdbcComponent with a SQL Statement returing a ResultSet with two or more equal columnnames results in an invalid XML document.
> Example:
> SQL Statement
> SELECT * FROM TABLE1, TABLE2 WHERE TABLE1.ID = TABLE2.ID
> Resulting XML:
> --- 8< ---
> <sqlResults>
>   <resultSet>
>    <row id="1" id="1"/>
> ...
> --- 8< ---
> The column Names in this example are not unique.
> The attached patch solves this issue.
> The resulting document would look like this:
> --- 8< ---
> <sqlResults>
>   <resultSet>
>    <row id="1" id_1="1"/>
> ...
> --- 8< ---
> Test Case available.
> Kristian

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