Don't save non-changes to content history

Description

Background

When a default value for a document is different from the value in the database, the content history detects this as a change. But Doctrine doesn't write the change to the database.

This means it keeps generating records in the content history.

Example 1: phone number in database doesn't have a type

Example 2: reference has wrong db (it would be better to turn storage of $db off, this will be the default in Doctrine ODM 2, http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/reference-mapping.html)

Note: also when the changeset is empty a record is sometimes written to the content history.

Requirements

  • $db

    • ignore in ArrayComparer

  • Empty values

    • Values that are not set, are set with "null", so this problem is not present for the first level. This does however not work for values with multiple levels, so this check should be recursive.

Technical tasks

None

Deployment actions

None

Assignee

Unassigned

External issue ID

None

Client

Integrated Marijn

Min. hours

11

Dev hour estimate

None

Epic Link

Sprint

None

Fix versions

Configure