IDEMPIERE-2395 - Delete also corrupt records pointing to non-key tables

This commit is contained in:
Carlos Ruiz 2019-03-20 16:56:43 -03:00
parent 45498090f7
commit 160aa2a692
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ public class CleanOrphanCascade extends SvrProcess
MTable refTable = MTable.get(getCtx(), refTableID);
StringBuilder whereClause = new StringBuilder();
whereClause.append("AD_Table_ID = ").append(refTableID);
if (refTable.getKeyColumns().length != 1) {
if (refTable.getKeyColumns().length != 1 && !isUUIDMap) {
log.warning("Wrong reference for table " + tableName + " -> " + refTableName);
whereClause.append(" AND Record_ID>0");
} else {