IDEMPIERE-5567 Support of UUID as Key (FHCA-4195) (#2125)

* IDEMPIERE-5567 Support of UUID as Key (FHCA-4195)

- Fix PO.get_Translation failing for UUID tables

* - fix verification of zero ID
This commit is contained in:
Carlos Ruiz 2023-12-04 03:34:59 +01:00 committed by GitHub
parent 0be0c561c0
commit 1749154acb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -2220,9 +2220,12 @@ public abstract class PO
{
//
// Check if columnName, AD_Language is valid or table support translation (has 1 PK) => error
if (columnName == null || AD_Language == null
|| m_IDs.length > 1 || m_IDs[0].equals(I_ZERO)
|| !(m_IDs[0] instanceof Integer))
if ( columnName == null
|| AD_Language == null
|| m_IDs.length > 1
|| (m_IDs[0] instanceof Integer && m_IDs[0].equals(I_ZERO))
|| (m_IDs[0] instanceof String && Util.isEmpty((String)m_IDs[0]))
|| !(m_IDs[0] instanceof Integer || m_IDs[0] instanceof String))
{
throw new IllegalArgumentException("ColumnName=" + columnName
+ ", AD_Language=" + AD_Language