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