@@ 96-98 (lines=3) @@ | ||
93 | $inheritanceType = (string) $xmlRoot['inheritance-type']; |
|
94 | $class->setInheritanceType(constant(MappingClassMetadata::class . '::INHERITANCE_TYPE_' . $inheritanceType)); |
|
95 | } |
|
96 | if (isset($xmlRoot['change-tracking-policy'])) { |
|
97 | $class->setChangeTrackingPolicy(constant(MappingClassMetadata::class . '::CHANGETRACKING_' . strtoupper((string) $xmlRoot['change-tracking-policy']))); |
|
98 | } |
|
99 | if (isset($xmlRoot->{'discriminator-field'})) { |
|
100 | $discrField = $xmlRoot->{'discriminator-field'}; |
|
101 | /* XSD only allows for "name", which is consistent with association |
@@ 1322-1324 (lines=3) @@ | ||
1319 | if (isset($mapping['id']) && $mapping['id'] === true) { |
|
1320 | $mapping['name'] = '_id'; |
|
1321 | $this->identifier = $mapping['fieldName']; |
|
1322 | if (isset($mapping['strategy'])) { |
|
1323 | $this->generatorType = constant(ClassMetadata::class . '::GENERATOR_TYPE_' . strtoupper($mapping['strategy'])); |
|
1324 | } |
|
1325 | $this->generatorOptions = isset($mapping['options']) ? $mapping['options'] : array(); |
|
1326 | switch ($this->generatorType) { |
|
1327 | case self::GENERATOR_TYPE_AUTO: |
@@ 99-101 (lines=3) @@ | ||
96 | if (isset($element['shardKey'])) { |
|
97 | $this->setShardKey($class, $element['shardKey']); |
|
98 | } |
|
99 | if (isset($element['inheritanceType'])) { |
|
100 | $class->setInheritanceType(constant(MappingClassMetadata::class . '::INHERITANCE_TYPE_' . strtoupper($element['inheritanceType']))); |
|
101 | } |
|
102 | if (isset($element['discriminatorField'])) { |
|
103 | $class->setDiscriminatorField($this->parseDiscriminatorField($element['discriminatorField'])); |
|
104 | } |
|
@@ 111-113 (lines=3) @@ | ||
108 | if (isset($element['defaultDiscriminatorValue'])) { |
|
109 | $class->setDefaultDiscriminatorValue($element['defaultDiscriminatorValue']); |
|
110 | } |
|
111 | if (isset($element['changeTrackingPolicy'])) { |
|
112 | $class->setChangeTrackingPolicy(constant(MappingClassMetadata::class . '::CHANGETRACKING_' . strtoupper($element['changeTrackingPolicy']))); |
|
113 | } |
|
114 | if (isset($element['requireIndexes'])) { |
|
115 | $class->setRequireIndexes($element['requireIndexes']); |
|
116 | } |