소스 검색

fix regression with getParentFieldDescription method

Thomas Rabaix 14 년 전
부모
커밋
84694e0c8e
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      Model/ORM/ModelManager.php

+ 4 - 3
Model/ORM/ModelManager.php

@@ -118,9 +118,11 @@ class ModelManager implements ModelManagerInterface
 
         $metadata = $this->getMetadata($class);
 
+        $associatingMapping = $metadata->associationMappings[$parentAssociationMapping];
+
         $fieldDescription = $this->getNewFieldDescriptionInstance($class, $fieldName);
-        $fieldDescription[$fieldName]->setName($metadata->associationMappings[$parentAssociationMapping]);
-        $fieldDescription[$fieldName]->setAssociationMapping($metadata->associationMappings);
+        $fieldDescription->setName($parentAssociationMapping);
+        $fieldDescription->setAssociationMapping($associatingMapping);
 
         return $fieldDescription;
     }
@@ -175,7 +177,6 @@ class ModelManager implements ModelManagerInterface
      */
     public function getModelInstance($class)
     {
-
         return new $class;
     }