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