Skip to content

Commit

Permalink
Merge branch 'XML-IndexBy-Fix' into 2.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Oct 31, 2011
2 parents 7d0d06c + 5c4e3d9 commit d46910f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php
Expand Up @@ -322,8 +322,8 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
$mapping['orderBy'] = $orderBy;
}

if (isset($oneToManyElement->{'index-by'})) {
$mapping['indexBy'] = (string)$oneToManyElement->{'index-by'};
if (isset($oneToManyElement['index-by'])) {
$mapping['indexBy'] = (string)$oneToManyElement['index-by'];
}

$metadata->mapOneToMany($mapping);
Expand Down
Expand Up @@ -39,7 +39,7 @@
<join-column name="address_id" referenced-column-name="id" on-delete="CASCADE" on-update="CASCADE"/>
</one-to-one>

<one-to-many field="phonenumbers" target-entity="Phonenumber" mapped-by="user" orphan-removal="true">
<one-to-many field="phonenumbers" target-entity="Phonenumber" mapped-by="user" index-by="number" orphan-removal="true">
<cascade>
<cascade-persist/>
</cascade>
Expand Down

0 comments on commit d46910f

Please sign in to comment.