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

DDC-645 - Demoted <change-tracking-policy /> to an attribute on <entity /> to allow better validation, fixed XSD schema

This commit is contained in:
Benjamin Eberlei 2010-08-08 11:32:12 +02:00
parent 251247c16f
commit bd28cb1b12
3 changed files with 19 additions and 2 deletions

View File

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

View File

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

View File

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