1
0
mirror of synced 2024-12-05 03:06:05 +03:00

Rename custom-generator to custom-id-generator in XML mappint to match name in other mapping types

This commit is contained in:
Vitali Yakavenka 2011-11-28 23:36:23 +03:00
parent a8787be0bf
commit b72d150d33
3 changed files with 6 additions and 6 deletions

View File

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

View File

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

View File

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