Permalink
Browse files

Rename custom-generator to custom-id-generator in XML mappint to matc…

…h name in other mapping types
  • Loading branch information...
1 parent a8787be commit b72d150d3344bd322757e326ddacf85bae567604 @velovint velovint committed Nov 28, 2011
@@ -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>
@@ -250,8 +250,8 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
'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;
@@ -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>

0 comments on commit b72d150

Please sign in to comment.