Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
Allow column labels. Part of fix for BZ-1032183.
Browse files Browse the repository at this point in the history
(cherry-picked from 15497aa)
  • Loading branch information
jrenaat committed Nov 22, 2013
1 parent 755a966 commit 448a818
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -15,6 +15,7 @@
*/
package org.jboss.dashboard.dataset.sql;

import org.apache.commons.lang.StringUtils;
import org.jboss.dashboard.CoreServices;
import org.jboss.dashboard.database.hibernate.SQLStatementTrace;
import org.jboss.dashboard.dataset.AbstractDataSet;
Expand Down Expand Up @@ -111,7 +112,9 @@ public void load() throws Exception {
SQLDataSet.this.setPropertySize(propsSize);
for (int i = 0; i < propsSize; i++) {
SQLDataProperty dp = createSQLProperty();
dp.setPropertyId(meta.getColumnName(i + 1).toLowerCase());
String propId = StringUtils.isNotBlank(meta.getColumnLabel(i + 1)) ? meta.getColumnLabel(i + 1) : meta.getColumnName(i + 1);
dp.setPropertyId(propId.toLowerCase());
// dp.setPropertyId(meta.getColumnName(i + 1).toLowerCase());
dp.setType(meta.getColumnType(i + 1));
dp.setTableName(meta.getTableName(i + 1));
dp.setColumnName(meta.getColumnName(i + 1));
Expand Down

0 comments on commit 448a818

Please sign in to comment.