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
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
We make the assignation twice if any field has a context defined. This ensures
that the context will be evaluated with all initialized values when
the target records will be instantiated.
issue8586
review282041002
The server adds to the definition of the fields, the definition of relation
fields up to specific deep level.
The clients use this relation fields definition to extend the domain parser
with those fields using a dot notation. But those "dotted fields" are not
shown in the search filter to not bloat the popup as it is dedicated to
learning.
In addition, Dict fields are also filled with relation fields coming from the
keys defined in the schema model. As the size can very large, it is possible
to deactivate this feature from the configuration.
issue8293
review259391005
This is a valid depends value for a field but the __init__ method lose the
second _parent_ once it has been instantiated a first time.
Setting _parent_ value must be done recursively.
issue6441
review40261002
This method is there to only skip the id attribute to be set using the field
__set__ but it has a cost as it is called each time an attribute is set.
So we store now the id value in the attribute '_id' which doesn't overload the
field and we adapt field __get__ for this new location.
The __getitem__ is also removed as it is deprecated since 2.6.
issue5296
review17031002
changeset 8e8f1a801098 introduced a equality comparison of records without id
using the values. This prevents to store in a dictonary different instances
having by chance the same values. So it seems better to consider only as equal
the same instances without id.
issue4306
review10621002
Since changeset 690d629e0050, the field is always an original copy so it loose
the depends set on previous setup calls. The depends should be comptute all
over the mro.
issue4200
review13531002
Testing on the instance for Selection field is not enough because some field
selection could come from a Function field.
So it is better to use a duck typing style in this case.
issue3649
review3451002
* Use python-sql
* Add convert_domain method on Fields
* Add sql_format and sql_type methods on Fields
* Allow to return a full domain for Function.searcher
* Replace static backend by dynamic get method
* Replace order_field by order_<field name> method
review1001002