Don't store $db in reference

Description

Background

Currently, all references in Integrated contain the database name. In many cases, this name is different from the current database, because data has been migrated.

The $db is optional: https://docs.mongodb.com/manual/reference/database-references/#dbrefs

It is recommended not to use the $db field:
"For backwards compatibility storeAs=dbRefWithDb is the default, but storeAs=dbRef is the recommended setting."
http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/reference-mapping.html

Requirements

  • Set storeAs=dbRef for all references currently using the default storeAs=dbRefWithDb

  • We expect this does not affect current installations, in case we are wrong the migration script will be a separate issue

Technical tasks

There are 60 places in the code to change this.

Deployment actions

None

Assignee

Unassigned

Client

Integrated Marijn

Epic Link

Fix versions

Configure