doctrine/doctrine2 — pull request #1141 by goetas (2014-09-22 15:37:06+00:00)
Title: Always allow proxies on ToOne associations

Hi!
This patch combined with https://github.com/doctrine/common/pull/338 will allow to have proxies for long chains of ToOne associations:

```
User{
private $id; // @id
private $city;
private $name;
}
City{
private $id; // @id
private $region; // @id
private $name;
}
Region{
private $id; // @id
private $country; // @id
private $name;
}
Country{
private $id; // @id
private $name;
}
```

```php
$user = $repo->find(1);

// the current implementation must load the city, region
$user->getCity()->getRegion()->getCountry();
// the current implementation must load the city, region and the country
$user->getCity()->getRegion()->getCountry()->getName();

//with this patch
// here no queries will be executed
$user->getCity()->getRegion()->getCountry();
// here only will be loaded
$user->getCity()->getRegion()->getCountry()->getName();
```
Of course this patch will require some unit test, but can be acceptable as idea?