DDC-645 - Demoted <change-tracking-policy /> to an attribute on <entity /> to allow better validation, fixed XSD schema
This commit is contained in:
parent
251247c16f
commit
bd28cb1b12
@ -1,3 +1,11 @@
|
||||
# Update from 2.0-BETA3 to 2.0-BETA4
|
||||
|
||||
## XML Driver <change-tracking-policy /> element demoted to attribute
|
||||
|
||||
We changed how the XML Driver allows to define the change-tracking-policy. The working case is now:
|
||||
|
||||
<entity change-tracking-policy="DEFERRED_IMPLICT" />
|
||||
|
||||
# Update from 2.0-BETA2 to 2.0-BETA3
|
||||
|
||||
## Serialization of Uninitialized Proxies
|
||||
|
@ -75,6 +75,7 @@
|
||||
<xs:attribute name="schema" type="xs:NMTOKEN" />
|
||||
<xs:attribute name="repository-class" type="xs:NMTOKEN"/>
|
||||
<xs:attribute name="inheritance-type" type="orm:inheritance-type"/>
|
||||
<xs:attribute name="change-tracking-policy" type="orm:change-tracking-policy" />
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="mapped-superclass" >
|
||||
@ -82,6 +83,14 @@
|
||||
<xs:extension base="orm:entity"/>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:simpleType name="change-tracking-policy">
|
||||
<xs:restriction base="xs:token">
|
||||
<xs:enumeration value="DEFERRED_IMPLICIT"/>
|
||||
<xs:enumeration value="DEFERRED_EXPLICIT"/>
|
||||
<xs:enumeration value="NOTIFY"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="inheritance-type">
|
||||
<xs:restriction base="xs:token">
|
||||
|
@ -99,9 +99,9 @@ class XmlDriver extends AbstractFileDriver
|
||||
}
|
||||
|
||||
// Evaluate <change-tracking-policy...>
|
||||
if (isset($xmlRoot->{'change-tracking-policy'})) {
|
||||
if (isset($xmlRoot['change-tracking-policy'])) {
|
||||
$metadata->setChangeTrackingPolicy(constant('Doctrine\ORM\Mapping\ClassMetadata::CHANGETRACKING_'
|
||||
. strtoupper((string)$xmlRoot->{'change-tracking-policy'})));
|
||||
. strtoupper((string)$xmlRoot['change-tracking-policy'])));
|
||||
}
|
||||
|
||||
// Evaluate <indexes...>
|
||||
|
Loading…
Reference in New Issue
Block a user