IDEMPIERE-2368 Synchronize column not create table if virtual column is first / thanks to Nikita Polkovnikov

This commit is contained in:
Carlos Ruiz 2014-12-22 10:03:45 -05:00
parent 47d6bd135f
commit 5d87eb5c55
1 changed files with 5 additions and 2 deletions

View File

@ -540,15 +540,18 @@ public class MTable extends X_AD_Table
// boolean hasParents = false; // boolean hasParents = false;
StringBuffer constraints = new StringBuffer(); StringBuffer constraints = new StringBuffer();
getColumns(true); getColumns(true);
boolean columnAdded = false;
for (int i = 0; i < m_columns.length; i++) for (int i = 0; i < m_columns.length; i++)
{ {
MColumn column = m_columns[i]; MColumn column = m_columns[i];
String colSQL = column.getSQLDDL(); String colSQL = column.getSQLDDL();
if ( colSQL != null ) if ( colSQL != null )
{ {
if (i > 0) if (columnAdded)
sb.append(", "); sb.append(", ");
sb.append(column.getSQLDDL()); else
columnAdded = true;
sb.append(column.getSQLDDL());
} }
else // virtual column else // virtual column
continue; continue;