redo for red1 case: create a virtual column with name is [tableName]_ID
RedhuanO January 16, 2016 at 3:54 AM
I managed to replicate the error for virtual column. Tested patch attached.
RedhuanO January 14, 2016 at 7:30 PM
Edited
Creating constraint keys should not include virtual columns. If done manually in Window, Tab & Field the Synchronize Column also does not appear as its Display Logic is @IsView@='N' & @ColumnSQL@='' thus the column exists in AD_Column without existing in actual database table. Therefore the following would have been necessary (see ColumnSQLException.patch attached):
+++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java if (table.isView()) { continue; } if (column.getColumnSQL()!=null) { log.fine("*** FINE checking for VIRTUAL COLUMN - getColumnSQL:"+column.getColumnSQL()); if (!column.getColumnSQL().isEmpty()) continue; }
When 2Pack is creating new tables or new columns, it is not creating the foreign keys as they are created using synchronize column.