From c2217ee13fe8d8d709da7a982253bccbd232407b Mon Sep 17 00:00:00 2001 From: jpauli Date: Mon, 28 Nov 2011 14:09:46 +0100 Subject: [PATCH] Fixed typo/mistake in variable name in relation handling with Doctrine --- src/Faker/ORM/Doctrine/EntityPopulator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Faker/ORM/Doctrine/EntityPopulator.php b/src/Faker/ORM/Doctrine/EntityPopulator.php index 0f89f192..790c8063 100644 --- a/src/Faker/ORM/Doctrine/EntityPopulator.php +++ b/src/Faker/ORM/Doctrine/EntityPopulator.php @@ -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; }; }