diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php index 6a18610ee..3e6258fdb 100644 --- a/lib/Doctrine/ORM/Tools/EntityGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -707,6 +707,9 @@ public function () private function _isAssociationIsNullable($associationMapping) { + if (isset($associationMapping['id']) && $associationMapping['id']) { + return false; + } if (isset($associationMapping['joinColumns'])) { $joinColumns = $associationMapping['joinColumns']; } else {