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())
|
while (it.hasNext())
|
||||||
{
|
{
|
||||||
MTable retValue = it.next();
|
MTable retValue = it.next();
|
||||||
if (tableName.equalsIgnoreCase(retValue.getTableName())
|
if (tableName.equalsIgnoreCase(retValue.getTableName()))
|
||||||
&& retValue.getCtx() == ctx
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
return retValue;
|
return s_cache.get (ctx, retValue.get_ID(), e -> new MTable(ctx, e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
MTable retValue = null;
|
MTable retValue = null;
|
||||||
|
@ -186,7 +184,7 @@ public class MTable extends X_AD_Table implements ImmutablePOSupport
|
||||||
if (retValue != null)
|
if (retValue != null)
|
||||||
{
|
{
|
||||||
Integer key = Integer.valueOf(retValue.getAD_Table_ID());
|
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;
|
return retValue;
|
||||||
} // get
|
} // get
|
||||||
|
|
Loading…
Reference in New Issue