1
0
mirror of synced 2024-12-13 22:56:04 +03:00

Convention fix

This commit is contained in:
rivaros 2012-03-05 10:29:06 +02:00 committed by Benjamin Eberlei
parent b346f1901a
commit 9c4e52c136

View File

@ -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);
}
}