Use a weakreference in EntityAdapter

This reverts commit f7c69ed8.

Closes #3572625

Merge request reports

Loading