[ofbiz-framework] branch trunk updated: Incorrect column alias in EntitySQLProcessor for sql query working with mysql (OFBIZ-11573)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch trunk updated: Incorrect column alias in EntitySQLProcessor for sql query working with mysql (OFBIZ-11573)

Pawan Verma-2
This is an automated email from the ASF dual-hosted git repository.

pawan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 1e05f0c  Incorrect column alias in EntitySQLProcessor for sql query working with mysql (OFBIZ-11573)
1e05f0c is described below

commit 1e05f0c72d65ceb35f54b4574c96c26a7c16c76b
Author: Pawan Verma <[hidden email]>
AuthorDate: Tue Apr 28 10:54:57 2020 +0530

    Incorrect column alias in EntitySQLProcessor for sql query working with mysql
    (OFBIZ-11573)
   
    More details: Method getColumnLabel returns the designated column's suggested title for use in printouts and displays. Method getColumnName returns the designated column's name.
   
    Thanks: Suraj and Jacques for the review.
---
 framework/webtools/groovyScripts/entity/EntitySQLProcessor.groovy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/webtools/groovyScripts/entity/EntitySQLProcessor.groovy b/framework/webtools/groovyScripts/entity/EntitySQLProcessor.groovy
index 8d16cd3..c85fed2 100644
--- a/framework/webtools/groovyScripts/entity/EntitySQLProcessor.groovy
+++ b/framework/webtools/groovyScripts/entity/EntitySQLProcessor.groovy
@@ -45,7 +45,7 @@ if (sqlCommand && selGroup) {
                 rsmd = rs.getMetaData()
                 numberOfColumns = rsmd.getColumnCount()
                 for (i = 1; i <= numberOfColumns; i++) {
-                    columns.add(rsmd.getColumnName(i))
+                    columns.add(rsmd.getColumnLabel(i))
                 }
                 rowLimitReached = false
                 while (rs.next()) {