Editing versioned objects can load values that now fail foreign key restraints

Description

Scenario:

Versioned object X has a record with reference to a security_user.
Security_user is then deleted. Main record in X cascades and nulls field. But when editing record, it gets the data from the version table.
Object picker is unable to find that ID, so looks blank - but hidden field is still pointing to the deleted user record. So when it is saved, it throws a foreign key error...

Environment

None
Fixed

Assignee

Seb Duggan

Reporter

Seb Duggan