IDEMPIERE-5407 - Fix Wrong getIdColumnName Validation (#1893)

* IDEMPIERE-5407 - Fix Wrong getIdColumnName Validation

* IDEMPIERE-5407 - patch by Carlos
This commit is contained in:
Peter Takács 2023-06-09 10:36:18 +02:00 committed by GitHub
parent 632352c1cb
commit f0c87202b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -968,7 +968,7 @@ public final class MRole extends X_AD_Role implements ImmutablePOSupport
MTable table = MTable.get(getCtx(), tableName);
if (table == null)
return false;
return MTable.get(getCtx(), tableName).isView();
return table.isView();
}
private String getIdColumnName(String tableName)
@ -977,7 +977,7 @@ public final class MRole extends X_AD_Role implements ImmutablePOSupport
MTable table = MTable.get(getCtx(), tableName);
if (table == null)
return null;
if (MTable.get(getCtx(), tableName).columnExists(colkey.toString()))
if (table.getColumnIndex(colkey.toString()) >= 0)
return colkey.toString();
return null;
}