@@ 91-93 (lines=3) @@ | ||
88 | $inheritanceType = (string) $xmlRoot['inheritance-type']; |
|
89 | $class->setInheritanceType(constant(MappingClassMetadata::class . '::INHERITANCE_TYPE_' . $inheritanceType)); |
|
90 | } |
|
91 | if (isset($xmlRoot['change-tracking-policy'])) { |
|
92 | $class->setChangeTrackingPolicy(constant(MappingClassMetadata::class . '::CHANGETRACKING_' . strtoupper((string) $xmlRoot['change-tracking-policy']))); |
|
93 | } |
|
94 | if (isset($xmlRoot->{'discriminator-field'})) { |
|
95 | $discrField = $xmlRoot->{'discriminator-field'}; |
|
96 | /* XSD only allows for "name", which is consistent with association |
@@ 81-83 (lines=3) @@ | ||
78 | $class->addIndex($index['keys'], isset($index['options']) ? $index['options'] : array()); |
|
79 | } |
|
80 | } |
|
81 | if (isset($element['inheritanceType'])) { |
|
82 | $class->setInheritanceType(constant(MappingClassMetadata::class . '::INHERITANCE_TYPE_' . strtoupper($element['inheritanceType']))); |
|
83 | } |
|
84 | if (isset($element['discriminatorField'])) { |
|
85 | $class->setDiscriminatorField($this->parseDiscriminatorField($element['discriminatorField'])); |
|
86 | } |
|
@@ 93-95 (lines=3) @@ | ||
90 | if (isset($element['defaultDiscriminatorValue'])) { |
|
91 | $class->setDefaultDiscriminatorValue($element['defaultDiscriminatorValue']); |
|
92 | } |
|
93 | if (isset($element['changeTrackingPolicy'])) { |
|
94 | $class->setChangeTrackingPolicy(constant(MappingClassMetadata::class . '::CHANGETRACKING_' . strtoupper($element['changeTrackingPolicy']))); |
|
95 | } |
|
96 | if (isset($element['requireIndexes'])) { |
|
97 | $class->setRequireIndexes($element['requireIndexes']); |
|
98 | } |
@@ 1162-1164 (lines=3) @@ | ||
1159 | if (isset($mapping['id']) && $mapping['id'] === true) { |
|
1160 | $mapping['name'] = '_id'; |
|
1161 | $this->identifier = $mapping['fieldName']; |
|
1162 | if (isset($mapping['strategy'])) { |
|
1163 | $this->generatorType = constant(ClassMetadata::class . '::GENERATOR_TYPE_' . strtoupper($mapping['strategy'])); |
|
1164 | } |
|
1165 | $this->generatorOptions = isset($mapping['options']) ? $mapping['options'] : array(); |
|
1166 | switch ($this->generatorType) { |
|
1167 | case self::GENERATOR_TYPE_AUTO: |