@@ 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 |
@@ 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 | } |
@@ 1388-1390 (lines=3) @@ | ||
1385 | if (isset($mapping['id']) && $mapping['id'] === true) { |
|
1386 | $mapping['name'] = '_id'; |
|
1387 | $this->identifier = $mapping['fieldName']; |
|
1388 | if (isset($mapping['strategy'])) { |
|
1389 | $this->generatorType = constant(ClassMetadata::class . '::GENERATOR_TYPE_' . strtoupper($mapping['strategy'])); |
|
1390 | } |
|
1391 | $this->generatorOptions = isset($mapping['options']) ? $mapping['options'] : array(); |
|
1392 | switch ($this->generatorType) { |
|
1393 | case self::GENERATOR_TYPE_AUTO: |