IDEMPIERE-5567 Support of UUID as Key (FHCA-4195) - Fixes #TestDay2023 (#2134)
- CleanOrphanCascade is failing when there are orphan change log records for M_InOutLineMA or other non-ID tables - MoveClient is failing when there are AD_PInstance orphan records (because of the recently added AD_Table_ID reference)
This commit is contained in:
parent
8dfb29c91d
commit
ffdde952fb
|
@ -139,7 +139,7 @@ public class CleanOrphanCascade extends SvrProcess
|
|||
String colRef = refTable.getKeyColumns()[0];
|
||||
String colRefUU = PO.getUUIDColumnName(refTableName);
|
||||
|
||||
if (colRecordID != null && ! refTable.isUUIDKeyTable()) {
|
||||
if (colRecordID != null && refTable.isIDKeyTable()) {
|
||||
StringBuilder whereClause = new StringBuilder("AD_Table_ID=").append(refTableID)
|
||||
.append(" AND Record_ID>0")
|
||||
.append(" AND NOT EXISTS (SELECT ").append(colRef)
|
||||
|
|
|
@ -1170,8 +1170,10 @@ public class MoveClient extends SvrProcess {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
if ("AD_ChangeLog".equalsIgnoreCase(tableName) || "AD_PInstance_Log".equalsIgnoreCase(tableName)) {
|
||||
// skip orphan records in AD_ChangeLog and AD_PInstance_Log, can be log of deleted records, skip
|
||||
if ( "AD_ChangeLog".equalsIgnoreCase(tableName)
|
||||
|| "AD_PInstance".equalsIgnoreCase(tableName)
|
||||
|| "AD_PInstance_Log".equalsIgnoreCase(tableName)) {
|
||||
// skip orphan records in AD_ChangeLog, AD_PInstance and AD_PInstance_Log, can be log of deleted records, skip
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue