The shared cache is designed for loop usage so we must ensure that we fill the
LRU dictionary in the same order as the loop will request attributes.
So we must order the result of the read because the API does not return data in
the same order as the list of ids.
issue9518
review318041002
It is not allowed to Call SET TRANSACTION in an AUTOCOMMIT transaction.
It is better to set 'readonly' attribute when available and not set the
transaction in readonly when autocommit is set.
issue9477
review294171002
The values may contain None which is not orderable so we insert a third
argument before the value to prevent to compare None value against others.
issue9381
review303881005
Some read value may be needed to instantiate other records if it is used in the
context.
Also the test to fill fields dictionary was always false as it tested the field
instance instead of the name.
issue9380
review298171002
We implement the same behavior as SQL with NULL which always returns NULL
except for IS operator. So the evaluation has the same result as the search.
issue8615
review290281002
In order to have store them efficiently in dictionary, we generate a different
hash for each unsaved record by using the instance id.
issue9240
review295421002
The test relies on the cache being cleared before setting a value from the old
transaction. So we must wait for the synchronisation to happen when channel is
used.
issue9413
review327461011
By using a class with slots instead of standard dict, we can reduce a lot the
memory usage to store the record data in the caches and values.
Also we can rely on the data in the cache to exist only for real field which
can be used to create a fast path in ModelStorage.__getattr__.
As now storing data in the cache has no extra cost, we can store data from the
transactional cache in the local. This allow also to have a shorter path in
ModelStorage.__getattr__.
For more memory efficiency, we remove the record from the cache instead of
clearing them. It was better to clear a dict but a record is less expensive to
re-instantiate than clearing.
issue9369
issue9225
review297861002
When a relation domain is not valid, the domain used to set on the exception
must be evaluated with the origin record and not the invalid target record.
We take the first origin record as any of the passed record will generate the
same domain per design.
issue9383
review317531002
The price_decimal stored in ir.configuration is checked against the current
configuration value. We do not allow to start serving a database for which the
values are different as it may be due to a misconfiguration which can lead to
data corruption.
issue9324
review317381002
If the record is unsaved and the getter is based on on_change_with, we can call
the getter to compute the value.
This value must not be stored in the cache as it may change prior to saving.
issue4193
issue9263
review317291002