@@ 1270-1272 (lines=3) @@ | ||
1267 | if (isset($mapping['id']) && $mapping['id'] === true) { |
|
1268 | $mapping['name'] = '_id'; |
|
1269 | $this->identifier = $mapping['fieldName']; |
|
1270 | if (isset($mapping['strategy'])) { |
|
1271 | $this->generatorType = constant(ClassMetadata::class . '::GENERATOR_TYPE_' . strtoupper($mapping['strategy'])); |
|
1272 | } |
|
1273 | $this->generatorOptions = $mapping['options'] ?? array(); |
|
1274 | switch ($this->generatorType) { |
|
1275 | case self::GENERATOR_TYPE_AUTO: |
@@ 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 (isset($element['slaveOkay'])) { |
|
98 | $class->setSlaveOkay($element['slaveOkay']); |
|
99 | } |