1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-03-24 17:29:50 +01:00

Merge pull request #24 from jpauli/patch-1

Fixed typo/mistake in variable name in relation handling with Doctrine
This commit is contained in:
Francois Zaninotto 2011-11-28 06:04:44 -08:00
commit 1583909943

View File

@ -76,7 +76,7 @@ class EntityPopulator
if (!$this->class->isIdentifier($assocName) || !$this->class->isCollectionValuedAssociation($assocName)) {
continue;
}
$relatedClass = $this->class->getAssociationTargetClass($fieldName);
$relatedClass = $this->class->getAssociationTargetClass($assocName);
$formatters[$assocName] = function($inserted) use($relatedClass) { return isset($inserted[$relatedClass]) ? $inserted[$relatedClass][mt_rand(0, count($inserted[$relatedClass]) - 1)] : null; };
}