IDEMPIERE-3923 Pack In inserts zero on AD_Role and AD_User when UUID is not found

This commit is contained in:
Carlos Ruiz 2019-03-18 19:52:47 -03:00
parent 08079c4df2
commit a56d51fc8a
1 changed files with 4 additions and 4 deletions

View File

@ -58,10 +58,10 @@ public class IDFinder {
* @param trxName * @param trxName
*/ */
public static int findIdByColumn (String tableName, String columnName, Object value, int AD_Client_ID, boolean ignorecase, String trxName) { public static int findIdByColumn (String tableName, String columnName, Object value, int AD_Client_ID, boolean ignorecase, String trxName) {
int id = 0;
if (value == null) if (value == null)
return id; return 0;
int id = -1;
//construct cache key //construct cache key
StringBuilder key = new StringBuilder(); StringBuilder key = new StringBuilder();
@ -168,7 +168,7 @@ public class IDFinder {
} }
//update cache //update cache
if (id > 0) if (id >= 0)
idCache.put(key.toString(), id); idCache.put(key.toString(), id);
return id; return id;