Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b72d150

Browse files
committed
Rename custom-generator to custom-id-generator in XML mappint to match name in other mapping types
1 parent a8787be commit b72d150

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

doctrine-mapping.xsd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@
254254
<xs:sequence>
255255
<xs:element name="generator" type="orm:generator" minOccurs="0" />
256256
<xs:element name="sequence-generator" type="orm:sequence-generator" minOccurs="0" maxOccurs="1" />
257-
<xs:element name="custom-generator" type="orm:custom-generator" minOccurs="0" maxOccurs="1" />
257+
<xs:element name="custom-id-generator" type="orm:custom-id-generator" minOccurs="0" maxOccurs="1" />
258258
<xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"/>
259259
</xs:sequence>
260260
<xs:attribute name="name" type="xs:NMTOKEN" use="required" />
@@ -274,7 +274,7 @@
274274
<xs:anyAttribute namespace="##other"/>
275275
</xs:complexType>
276276

277-
<xs:complexType name="custom-generator">
277+
<xs:complexType name="custom-id-generator">
278278
<xs:sequence>
279279
<xs:element name="args" minOccurs="0" maxOccurs="1">
280280
<xs:complexType>

lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
250250
'allocationSize' => (string)$seqGenerator['allocation-size'],
251251
'initialValue' => (string)$seqGenerator['initial-value']
252252
));
253-
} else if (isset($idElement->{'custom-generator'})) {
254-
$customGenerator = $idElement->{'custom-generator'};
253+
} else if (isset($idElement->{'custom-id-generator'})) {
254+
$customGenerator = $idElement->{'custom-id-generator'};
255255
$args = array();
256256
foreach ($customGenerator->args->children() as $argument) {
257257
$args[] = (string) $argument;

tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.Animal.dcm.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
</discriminator-map>
1111
<id name="id" type="integer" column="id">
1212
<generator strategy="CUSTOM"/>
13-
<custom-generator class="stdClass">
13+
<custom-id-generator class="stdClass">
1414
<args>
1515
<arg>par1</arg>
1616
<arg>par2</arg>
1717
</args>
18-
</custom-generator>
18+
</custom-id-generator>
1919
</id>
2020
</entity>
2121
</doctrine-mapping>

0 commit comments

Comments
 (0)