lib/Doctrine/ODM/MongoDB/Mapping/Driver/XmlDriver.php 1 location
|
@@ 218-224 (lines=7) @@
|
| 215 |
|
|
| 216 |
|
private function addFieldMapping(ClassMetadataInfo $class, $mapping) |
| 217 |
|
{ |
| 218 |
|
if (isset($mapping['name'])) { |
| 219 |
|
$name = $mapping['name']; |
| 220 |
|
} elseif (isset($mapping['fieldName'])) { |
| 221 |
|
$name = $mapping['fieldName']; |
| 222 |
|
} else { |
| 223 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
| 224 |
|
} |
| 225 |
|
|
| 226 |
|
$class->mapField($mapping); |
| 227 |
|
|
lib/Doctrine/ODM/MongoDB/Mapping/Driver/YamlDriver.php 1 location
|
@@ 175-181 (lines=7) @@
|
| 172 |
|
|
| 173 |
|
private function addFieldMapping(ClassMetadataInfo $class, $mapping) |
| 174 |
|
{ |
| 175 |
|
if (isset($mapping['name'])) { |
| 176 |
|
$name = $mapping['name']; |
| 177 |
|
} elseif (isset($mapping['fieldName'])) { |
| 178 |
|
$name = $mapping['fieldName']; |
| 179 |
|
} else { |
| 180 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
| 181 |
|
} |
| 182 |
|
|
| 183 |
|
$class->mapField($mapping); |
| 184 |
|
|