@@ 81-83 (lines=3) @@ | ||
78 | if (isset($element['shardKey'])) { |
|
79 | $this->setShardKey($class, $element['shardKey']); |
|
80 | } |
|
81 | if (isset($element['inheritanceType'])) { |
|
82 | $class->setInheritanceType(constant(MappingClassMetadata::class . '::INHERITANCE_TYPE_' . strtoupper($element['inheritanceType']))); |
|
83 | } |
|
84 | if (isset($element['discriminatorField'])) { |
|
85 | $class->setDiscriminatorField($this->parseDiscriminatorField($element['discriminatorField'])); |
|
86 | } |
|
@@ 93-95 (lines=3) @@ | ||
90 | if (isset($element['defaultDiscriminatorValue'])) { |
|
91 | $class->setDefaultDiscriminatorValue($element['defaultDiscriminatorValue']); |
|
92 | } |
|
93 | if (isset($element['changeTrackingPolicy'])) { |
|
94 | $class->setChangeTrackingPolicy(constant(MappingClassMetadata::class . '::CHANGETRACKING_' . strtoupper($element['changeTrackingPolicy']))); |
|
95 | } |
|
96 | if (! empty($element['readOnly'])) { |
|
97 | $class->markReadOnly(); |
|
98 | } |
@@ 78-80 (lines=3) @@ | ||
75 | $inheritanceType = (string) $xmlRoot['inheritance-type']; |
|
76 | $class->setInheritanceType(constant(MappingClassMetadata::class . '::INHERITANCE_TYPE_' . $inheritanceType)); |
|
77 | } |
|
78 | if (isset($xmlRoot['change-tracking-policy'])) { |
|
79 | $class->setChangeTrackingPolicy(constant(MappingClassMetadata::class . '::CHANGETRACKING_' . strtoupper((string) $xmlRoot['change-tracking-policy']))); |
|
80 | } |
|
81 | if (isset($xmlRoot->{'discriminator-field'})) { |
|
82 | $discrField = $xmlRoot->{'discriminator-field'}; |
|
83 | /* XSD only allows for "name", which is consistent with association |
@@ 1951-1953 (lines=3) @@ | ||
1948 | if (isset($mapping['id']) && $mapping['id'] === true) { |
|
1949 | $mapping['name'] = '_id'; |
|
1950 | $this->identifier = $mapping['fieldName']; |
|
1951 | if (isset($mapping['strategy'])) { |
|
1952 | $this->generatorType = constant(ClassMetadata::class . '::GENERATOR_TYPE_' . strtoupper($mapping['strategy'])); |
|
1953 | } |
|
1954 | $this->generatorOptions = $mapping['options'] ?? array(); |
|
1955 | switch ($this->generatorType) { |
|
1956 | case self::GENERATOR_TYPE_AUTO: |