@@ 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 |
@@ 90-92 (lines=3) @@ | ||
87 | if (isset($element['shardKey'])) { |
|
88 | $this->setShardKey($class, $element['shardKey']); |
|
89 | } |
|
90 | if (isset($element['inheritanceType'])) { |
|
91 | $class->setInheritanceType(constant(MappingClassMetadata::class . '::INHERITANCE_TYPE_' . strtoupper($element['inheritanceType']))); |
|
92 | } |
|
93 | if (isset($element['discriminatorField'])) { |
|
94 | $class->setDiscriminatorField($this->parseDiscriminatorField($element['discriminatorField'])); |
|
95 | } |
|
@@ 102-104 (lines=3) @@ | ||
99 | if (isset($element['defaultDiscriminatorValue'])) { |
|
100 | $class->setDefaultDiscriminatorValue($element['defaultDiscriminatorValue']); |
|
101 | } |
|
102 | if (isset($element['changeTrackingPolicy'])) { |
|
103 | $class->setChangeTrackingPolicy(constant(MappingClassMetadata::class . '::CHANGETRACKING_' . strtoupper($element['changeTrackingPolicy']))); |
|
104 | } |
|
105 | if (isset($element['requireIndexes'])) { |
|
106 | $class->setRequireIndexes($element['requireIndexes']); |
|
107 | } |
@@ 1291-1293 (lines=3) @@ | ||
1288 | if (isset($mapping['id']) && $mapping['id'] === true) { |
|
1289 | $mapping['name'] = '_id'; |
|
1290 | $this->identifier = $mapping['fieldName']; |
|
1291 | if (isset($mapping['strategy'])) { |
|
1292 | $this->generatorType = constant(ClassMetadata::class . '::GENERATOR_TYPE_' . strtoupper($mapping['strategy'])); |
|
1293 | } |
|
1294 | $this->generatorOptions = isset($mapping['options']) ? $mapping['options'] : array(); |
|
1295 | switch ($this->generatorType) { |
|
1296 | case self::GENERATOR_TYPE_AUTO: |