[ 1735618 ] GridTable error when there is no model generated
http://sourceforge.net/tracker/index.php?func=detail&aid=1735618&group_id=176962&atid=879332
This commit is contained in:
parent
66edaf6eb8
commit
2e23edc9c9
|
@ -1166,12 +1166,13 @@ public class GridTable extends AbstractTableModel
|
||||||
|
|
||||||
// Update SQL with specific where clause
|
// Update SQL with specific where clause
|
||||||
StringBuffer select = new StringBuffer("SELECT ");
|
StringBuffer select = new StringBuffer("SELECT ");
|
||||||
for (int i = 0; i < m_fields.size(); i++)
|
for (int i = 0, addedColumns = 0; i < m_fields.size(); i++)
|
||||||
{
|
{
|
||||||
GridField field = (GridField)m_fields.get(i);
|
GridField field = (GridField)m_fields.get(i);
|
||||||
if (m_inserting && field.isVirtualColumn())
|
if (m_inserting && field.isVirtualColumn())
|
||||||
continue;
|
continue;
|
||||||
if (i > 0)
|
// Add "," if it is not the first added column - teo_sarca [ 1735618 ]
|
||||||
|
if (addedColumns++ > 0)
|
||||||
select.append(",");
|
select.append(",");
|
||||||
select.append(field.getColumnSQL(true)); // ColumnName or Virtual Column
|
select.append(field.getColumnSQL(true)); // ColumnName or Virtual Column
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue