Convention fix
This commit is contained in:
parent
b346f1901a
commit
9c4e52c136
@ -298,7 +298,7 @@ class DatabaseDriver implements Driver
|
|||||||
$associationMapping = array();
|
$associationMapping = array();
|
||||||
$associationMapping['fieldName'] = $this->getFieldNameForColumn($tableName, $localColumn, true);
|
$associationMapping['fieldName'] = $this->getFieldNameForColumn($tableName, $localColumn, true);
|
||||||
$associationMapping['targetEntity'] = $this->getClassNameForTable($foreignTable);
|
$associationMapping['targetEntity'] = $this->getClassNameForTable($foreignTable);
|
||||||
|
|
||||||
if ($primaryKeyColumns && in_array($localColumn, $primaryKeyColumns)) {
|
if ($primaryKeyColumns && in_array($localColumn, $primaryKeyColumns)) {
|
||||||
$associationMapping['id'] = true;
|
$associationMapping['id'] = true;
|
||||||
}
|
}
|
||||||
@ -313,8 +313,7 @@ class DatabaseDriver implements Driver
|
|||||||
//Here we need to check if $cols are the same as $primaryKeyColums
|
//Here we need to check if $cols are the same as $primaryKeyColums
|
||||||
if (!array_diff($cols,$primaryKeyColumns)) {
|
if (!array_diff($cols,$primaryKeyColumns)) {
|
||||||
$metadata->mapOneToOne($associationMapping);
|
$metadata->mapOneToOne($associationMapping);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$metadata->mapManyToOne($associationMapping);
|
$metadata->mapManyToOne($associationMapping);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user