From 88bbee127c8c7ca69bcda26763ab6d3228174ae7 Mon Sep 17 00:00:00 2001 From: Sergio Moya Date: Thu, 26 Jan 2012 17:37:50 +0100 Subject: [PATCH] No unique join column fields for Single Table inheritance type. --- lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index 328d7bc35..e4b2bf4da 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -1217,7 +1217,7 @@ class ClassMetadataInfo implements ClassMetadata $uniqueContraintColumns = array(); foreach ($mapping['joinColumns'] as $key => &$joinColumn) { - if ($mapping['type'] === self::ONE_TO_ONE) { + if ($mapping['type'] === self::ONE_TO_ONE && ! $this->isInheritanceTypeSingleTable()) { if (count($mapping['joinColumns']) == 1) { $joinColumn['unique'] = true; } else {