lib/Doctrine/ODM/MongoDB/Mapping/Driver/XmlDriver.php 1 location
|
@@ 186-192 (lines=7) @@
|
| 183 |
|
|
| 184 |
|
private function addFieldMapping(MappingClassMetadata $class, $mapping) |
| 185 |
|
{ |
| 186 |
|
if (isset($mapping['name'])) { |
| 187 |
|
$name = $mapping['name']; |
| 188 |
|
} elseif (isset($mapping['fieldName'])) { |
| 189 |
|
$name = $mapping['fieldName']; |
| 190 |
|
} else { |
| 191 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
| 192 |
|
} |
| 193 |
|
|
| 194 |
|
$class->mapField($mapping); |
| 195 |
|
|
lib/Doctrine/ODM/MongoDB/Mapping/Driver/YamlDriver.php 1 location
|
@@ 154-160 (lines=7) @@
|
| 151 |
|
|
| 152 |
|
private function addFieldMapping(MappingClassMetadata $class, $mapping) |
| 153 |
|
{ |
| 154 |
|
if (isset($mapping['name'])) { |
| 155 |
|
$name = $mapping['name']; |
| 156 |
|
} elseif (isset($mapping['fieldName'])) { |
| 157 |
|
$name = $mapping['fieldName']; |
| 158 |
|
} else { |
| 159 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
| 160 |
|
} |
| 161 |
|
|
| 162 |
|
$class->mapField($mapping); |
| 163 |
|
|