- Backwards incompatible: By default the versioning table is now disabled in
the ``RecordMetadataBase`` (the ``RecordMetadata`` is still versioned). If
you subclasses ``RecordMetadataBase`` and needs versioning, you need to add
the following line in your class:
.. code-block:: python
class MyRecordMetadata(db.Model, RecordMetadataBase):
__versioned__ = {}
- Backwards incompatible: The ``Record.validate()`` method is now split in
two methods ``validate()`` and ``_validate()``. If you overwrote the
``validate()`` method in a subclass, you may need to overwrite instead
``_validate()``.
- Backwards incompatible: Due to the JSON encoding/decoding support, the
Python dictionary representing the record and the SQLAlchemy models are
separate objects and updating one, won't automatically update the other.
Normally, you should not have accessed ``record.model.json`` in your code,
however if you did, you need to rewrite it and rely on the ``create()`` and
``commit()`` methods to update the model's ``json`` column.
- Adds a new is_deleted property to the Records API.
- Removes the prefix that was used to separate metadata fields from other
fields.
- Adds a SystemFieldContext which allows knowing the record class when
accessing the attribute through the class instead of object instance.
- Adds helpers for caching related objects on the record.
- Adds support for JSON encoding/decoding to/from the database. This allows
e.g. have records with complex data types such as datetime objects.
JSONSchema validation happens on the JSON encoded version of the record.
- Adds dumpers to support dumping and loading records from secondary copies
(e.g. records stored in an Elasticsearch index).
- Adds support record extensions as a more strict replacement of signals.
Allows writing extensions (like the system fields), that integrate into the
Records API.
- Adds support for system fields that are Python data descriptors on the Record
which allows for managed access to the Record's dictionary.
- Adds support for disabling signals.
- Adds support for disabling JSONRef replacement.
- Adds support for specifying JSONSchema format checkers and validator class at
a class-level instead of per validate call.
- Adds support for specifying class-wide JSONSchema format checkers
- Adds a cleaner definition of a what a soft-deleted record using the
is_deleted hybrid property on the database model.
- Adds support for undeleting a soft-deleted record.