From b72d150d3344bd322757e326ddacf85bae567604 Mon Sep 17 00:00:00 2001 From: Vitali Yakavenka <vitali@yakavenka.net> Date: Mon, 28 Nov 2011 23:36:23 +0300 Subject: [PATCH] Rename custom-generator to custom-id-generator in XML mappint to match name in other mapping types --- doctrine-mapping.xsd | 4 ++-- lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php | 4 ++-- .../ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.Animal.dcm.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doctrine-mapping.xsd b/doctrine-mapping.xsd index 7c9cd2bfe..5fb261e13 100644 --- a/doctrine-mapping.xsd +++ b/doctrine-mapping.xsd @@ -254,7 +254,7 @@ <xs:sequence> <xs:element name="generator" type="orm:generator" minOccurs="0" /> <xs:element name="sequence-generator" type="orm:sequence-generator" minOccurs="0" maxOccurs="1" /> - <xs:element name="custom-generator" type="orm:custom-generator" minOccurs="0" maxOccurs="1" /> + <xs:element name="custom-id-generator" type="orm:custom-id-generator" minOccurs="0" maxOccurs="1" /> <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"/> </xs:sequence> <xs:attribute name="name" type="xs:NMTOKEN" use="required" /> @@ -274,7 +274,7 @@ <xs:anyAttribute namespace="##other"/> </xs:complexType> - <xs:complexType name="custom-generator"> + <xs:complexType name="custom-id-generator"> <xs:sequence> <xs:element name="args" minOccurs="0" maxOccurs="1"> <xs:complexType> diff --git a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php index af783cf4e..daa09dc15 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php @@ -250,8 +250,8 @@ class XmlDriver extends AbstractFileDriver 'allocationSize' => (string)$seqGenerator['allocation-size'], 'initialValue' => (string)$seqGenerator['initial-value'] )); - } else if (isset($idElement->{'custom-generator'})) { - $customGenerator = $idElement->{'custom-generator'}; + } else if (isset($idElement->{'custom-id-generator'})) { + $customGenerator = $idElement->{'custom-id-generator'}; $args = array(); foreach ($customGenerator->args->children() as $argument) { $args[] = (string) $argument; diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.Animal.dcm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.Animal.dcm.xml index 4f7e6d26f..3c58d4ad8 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.Animal.dcm.xml +++ b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.Animal.dcm.xml @@ -10,12 +10,12 @@ </discriminator-map> <id name="id" type="integer" column="id"> <generator strategy="CUSTOM"/> - <custom-generator class="stdClass"> + <custom-id-generator class="stdClass"> <args> <arg>par1</arg> <arg>par2</arg> </args> - </custom-generator> + </custom-id-generator> </id> </entity> </doctrine-mapping> \ No newline at end of file