Rename custom-generator to custom-id-generator in XML mappint to match name in other mapping types
This commit is contained in:
parent
a8787be0bf
commit
b72d150d33
@ -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 @@ 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;
|
||||
|
@ -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>
|
Loading…
Reference in New Issue
Block a user