lib/Doctrine/ODM/MongoDB/Mapping/Driver/XmlDriver.php 1 location
|
@@ 210-216 (lines=7) @@
|
| 207 |
|
|
| 208 |
|
private function addFieldMapping(ClassMetadataInfo $class, $mapping) |
| 209 |
|
{ |
| 210 |
|
if (isset($mapping['name'])) { |
| 211 |
|
$name = $mapping['name']; |
| 212 |
|
} elseif (isset($mapping['fieldName'])) { |
| 213 |
|
$name = $mapping['fieldName']; |
| 214 |
|
} else { |
| 215 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
| 216 |
|
} |
| 217 |
|
|
| 218 |
|
$class->mapField($mapping); |
| 219 |
|
|
lib/Doctrine/ODM/MongoDB/Mapping/Driver/YamlDriver.php 1 location
|
@@ 178-184 (lines=7) @@
|
| 175 |
|
|
| 176 |
|
private function addFieldMapping(ClassMetadataInfo $class, $mapping) |
| 177 |
|
{ |
| 178 |
|
if (isset($mapping['name'])) { |
| 179 |
|
$name = $mapping['name']; |
| 180 |
|
} elseif (isset($mapping['fieldName'])) { |
| 181 |
|
$name = $mapping['fieldName']; |
| 182 |
|
} else { |
| 183 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
| 184 |
|
} |
| 185 |
|
|
| 186 |
|
$class->mapField($mapping); |
| 187 |
|
|