1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Fixed bug in XMLDriver where relation indexes are treathed as elements but documented as attributes.

This commit is contained in:
Guilherme Blanco 2011-08-16 11:36:41 -03:00
parent 6857134f36
commit 7433148f17
2 changed files with 3 additions and 3 deletions

View File

@ -322,8 +322,8 @@ class XmlDriver extends AbstractFileDriver
$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);

View File

@ -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>