This document describes the PX1006 diagnostic.
Code | Short Description | Type | Code Fix |
---|---|---|---|
PX1006 | The order of view declarations will cause the creation of one cache instance for multiple DACs | Message | Unavailable |
For inherited DAC types, the order of data view declarations affects the number of PXCache
instances for these DACs as follows:
- Two
PXCache
instances are created if you declare the data views so that the first data view uses the base DAC, and the second data view uses the derived type. - A shared
PXCache
instance for the base DAC and the derived DAC is created if you declare the data views so that the first data view uses the derived DAC, and the second data view uses the base DAC.
The diagnostic supports graphs and graph extensions. The diagnostic works with the code based on Acumatica Framework 2018 R1 or earlier.
To use separate PXCache
instances, you change the order of data view declarations. If you are using a shared PXCache
instance, make sure the PXCache
instance refers to the needed DAC type.
public class BAccount : PXBqlTable, IBqlTable { }
public class Vendor : BAccount { }
public class VendorMaint : PXGraph<VendorMaint, Vendor> // The PX1006 warning is displayed for this line.
{
public PXSelect<Vendor> Vendor;
public PXSelect<BAccount> VendorBAcc;
// One PXCache<Vendor> instance is used for both Vendor and BAccount
}