Fix indexBy type extraction

This commit is contained in:
Mathieu Lemoine 2016-09-24 17:32:50 -04:00
parent b049d098d3
commit 138c6e3752
3 changed files with 4 additions and 3 deletions

View File

@ -88,7 +88,8 @@ class DoctrineExtractor implements PropertyListExtractorInterface, PropertyTypeE
if (isset($associationMapping['indexBy'])) {
$indexProperty = $associationMapping['indexBy'];
$typeOfField = $metadata->getTypeOfField($indexProperty);
$subMetadata = $this->classMetadataFactory->getMetadataFor($associationMapping['targetEntity']);
$typeOfField = $subMetadata->getTypeOfField($indexProperty);
$collectionKeyType = $this->getPhpType($typeOfField);
}

View File

@ -41,7 +41,7 @@ class DoctrineDummy
public $bar;
/**
* @ManyToMany(targetEntity="DoctrineRelation", indexBy="guid")
* @ManyToMany(targetEntity="DoctrineRelation", indexBy="rguid")
*/
protected $indexedBar;

View File

@ -31,5 +31,5 @@ class DoctrineRelation
/**
* @Column(type="guid")
*/
protected $guid;
protected $rguid;
}