From 5eadb77a88f1b84c2c738a01702ee7bdb5c2f4da Mon Sep 17 00:00:00 2001 From: Pawan Verma Date: Tue, 28 Apr 2020 10:54:57 +0530 Subject: [PATCH] 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. --- .../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 8d16cd3605..c85fed2902 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()) {