Natural keys fixture dumping for BEAT objects is missing
Since a long time we have the option to backup using natural primary and foreign keys, but this setting is not effective for our BEAT objects.
This triggered a bug while trying to do a restore on our new staging server: experiments reference database sets with integer foreigns keys, but there is no certainty that database sets will be re-stored on the same order or with the same primary keys, given they are re-created at restore time.
To fix this issue for good, we'd need to implement natural_key()
and get_by_natural_key()
on the relevant classes throughout the project.