I have two objects: user and client, one client can have many users.
Often I want to have a custom object and lazy client loading, but for some reason the client proxy does not load when I try to access its properties.
If I discard data like this \Doctrine\Common\Utils\Debug::log($user->client);, it will output a client proxy with its client id.
If I change the selection policy to "EAGER", I will get the client object unchanged, but I do not always need the client object when accessing users, so I prefer to use LAZY if possible.
EDIT
When I do this later:
$user->client->name
I will come back even if my proxy received a client ID.
These are my two relationships (inside the annotation):
private $client;
private $users;
EDIT
, , , , -.