From 7433148f17eba4740d6453a622b3d5b8eee7aac2 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Tue, 16 Aug 2011 11:36:41 -0300 Subject: [PATCH] Fixed bug in XMLDriver where relation indexes are treathed as elements but documented as attributes. --- lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php | 4 ++-- .../ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php index ab8e3b780..20631d63c 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php @@ -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); diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml index 524b2494f..f116fb0fe 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml +++ b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml @@ -39,7 +39,7 @@ - +