lib/Doctrine/ODM/MongoDB/Mapping/Driver/XmlDriver.php 1 location
|
@@ 207-213 (lines=7) @@
|
| 204 |
|
|
| 205 |
|
private function addFieldMapping(ClassMetadataInfo $class, $mapping) |
| 206 |
|
{ |
| 207 |
|
if (isset($mapping['name'])) { |
| 208 |
|
$name = $mapping['name']; |
| 209 |
|
} elseif (isset($mapping['fieldName'])) { |
| 210 |
|
$name = $mapping['fieldName']; |
| 211 |
|
} else { |
| 212 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
| 213 |
|
} |
| 214 |
|
|
| 215 |
|
$class->mapField($mapping); |
| 216 |
|
|
lib/Doctrine/ODM/MongoDB/Mapping/Driver/YamlDriver.php 1 location
|
@@ 169-175 (lines=7) @@
|
| 166 |
|
|
| 167 |
|
private function addFieldMapping(ClassMetadataInfo $class, $mapping) |
| 168 |
|
{ |
| 169 |
|
if (isset($mapping['name'])) { |
| 170 |
|
$name = $mapping['name']; |
| 171 |
|
} elseif (isset($mapping['fieldName'])) { |
| 172 |
|
$name = $mapping['fieldName']; |
| 173 |
|
} else { |
| 174 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
| 175 |
|
} |
| 176 |
|
|
| 177 |
|
$class->mapField($mapping); |
| 178 |
|
|