1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-03-22 16:29:55 +01:00

Fixed typo/mistake in variable name in relation handling with Doctrine

This commit is contained in:
jpauli 2011-11-28 14:09:46 +01:00
parent 3175a75882
commit c2217ee13f

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