IDEMPIERE-4287 Fix for AD_Table caching. (#293)
This commit is contained in:
parent
edf407614f
commit
4a0b44ac83
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue