From 9c4e52c13642d7f9aaf4aa3d8c0057f7c29129e4 Mon Sep 17 00:00:00 2001 From: rivaros Date: Mon, 5 Mar 2012 10:29:06 +0200 Subject: [PATCH] Convention fix --- lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php b/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php index faa38f13d..bcbdbd500 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php @@ -298,7 +298,7 @@ class DatabaseDriver implements Driver $associationMapping = array(); $associationMapping['fieldName'] = $this->getFieldNameForColumn($tableName, $localColumn, true); $associationMapping['targetEntity'] = $this->getClassNameForTable($foreignTable); - + if ($primaryKeyColumns && in_array($localColumn, $primaryKeyColumns)) { $associationMapping['id'] = true; } @@ -313,8 +313,7 @@ class DatabaseDriver implements Driver //Here we need to check if $cols are the same as $primaryKeyColums if (!array_diff($cols,$primaryKeyColumns)) { $metadata->mapOneToOne($associationMapping); - } - else { + } else { $metadata->mapManyToOne($associationMapping); } }