In Doctrine ORM (PHP), there is a method where we can get a reference/proxy for an entity, so we can use it in a relationship, for example:
https://www.doctrine-project.o