| @@ 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['slaveOkay'])) { |
|
| 115 | $class->setSlaveOkay($element['slaveOkay']); |
|
| 116 | } |
|
| @@ 1359-1361 (lines=3) @@ | ||
| 1356 | if (isset($mapping['id']) && $mapping['id'] === true) { |
|
| 1357 | $mapping['name'] = '_id'; |
|
| 1358 | $this->identifier = $mapping['fieldName']; |
|
| 1359 | if (isset($mapping['strategy'])) { |
|
| 1360 | $this->generatorType = constant(ClassMetadata::class . '::GENERATOR_TYPE_' . strtoupper($mapping['strategy'])); |
|
| 1361 | } |
|
| 1362 | $this->generatorOptions = isset($mapping['options']) ? $mapping['options'] : array(); |
|
| 1363 | switch ($this->generatorType) { |
|
| 1364 | case self::GENERATOR_TYPE_AUTO: |
|