IDEMPIERE-4287 Fix for AD_Table caching. (#293)

This commit is contained in:
igorpojzl 2020-10-12 15:37:21 +02:00 committed by GitHub
parent edf407614f
commit 4a0b44ac83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 6 deletions

View File

@ -153,12 +153,10 @@ public class MTable extends X_AD_Table implements ImmutablePOSupport
while (it.hasNext())
{
MTable retValue = it.next();
if (tableName.equalsIgnoreCase(retValue.getTableName())
&& retValue.getCtx() == ctx
)
if (tableName.equalsIgnoreCase(retValue.getTableName()))
{
return retValue;
}
return s_cache.get (ctx, retValue.get_ID(), e -> new MTable(ctx, e));
}
}
//
MTable retValue = null;
@ -186,7 +184,7 @@ public class MTable extends X_AD_Table implements ImmutablePOSupport
if (retValue != null)
{
Integer key = Integer.valueOf(retValue.getAD_Table_ID());
s_cache.put (key, retValue);
s_cache.put (key, retValue, e -> new MTable(Env.getCtx(), e));
}
return retValue;
} // get