diff --git a/org.adempiere.base/src/org/compiere/model/MTable.java b/org.adempiere.base/src/org/compiere/model/MTable.java index 5c1ba0795f..adac3df0d0 100644 --- a/org.adempiere.base/src/org/compiere/model/MTable.java +++ b/org.adempiere.base/src/org/compiere/model/MTable.java @@ -540,15 +540,18 @@ public class MTable extends X_AD_Table // boolean hasParents = false; StringBuffer constraints = new StringBuffer(); getColumns(true); + boolean columnAdded = false; for (int i = 0; i < m_columns.length; i++) { MColumn column = m_columns[i]; String colSQL = column.getSQLDDL(); if ( colSQL != null ) { - if (i > 0) + if (columnAdded) sb.append(", "); - sb.append(column.getSQLDDL()); + else + columnAdded = true; + sb.append(column.getSQLDDL()); } else // virtual column continue;