Reapply "Refactored to use the base Entity::replace() method."

This reverts commit 6bb3b0bc.

Closes #3584659

Merge request reports

Loading