doctrine/doctrine2 — comment on commit 68663fac4b5619643b8a140d6bbe7031e4fa2ad5
File:  line 0
By iBiryukov:

This creates a bug.

To reproduce, I have the following code

```
class Report {
/**
* The owner of this report
* @var entities\User | null
* @ManyToOne(targetEntity="User")
* @JoinColumn(name="owner", referencedColumnName="uid")
* @id
*/
private $owner;
```

If Report is fetched, and owner is null, then we get an undefined index warning on Line 2288 in UnitOfWork.php

```
foreach ($class->identifier as $fieldName) {
$id[$fieldName] = isset($class->associationMappings[$fieldName])
? $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']] // <---- HERE
: $data[$fieldName];
}
```
The $rowData variable in gatherRowData function that this commit modifies will be returned without mapped fields which are null. Hence, the above exception.
The bug is not critical, however, it will generate warnings.