lib/Doctrine/ODM/MongoDB/Mapping/Driver/XmlDriver.php 1 location
|
@@ 197-203 (lines=7) @@
|
| 194 |
|
|
| 195 |
|
private function addFieldMapping(ClassMetadataInfo $class, $mapping) |
| 196 |
|
{ |
| 197 |
|
if (isset($mapping['name'])) { |
| 198 |
|
$name = $mapping['name']; |
| 199 |
|
} elseif (isset($mapping['fieldName'])) { |
| 200 |
|
$name = $mapping['fieldName']; |
| 201 |
|
} else { |
| 202 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
| 203 |
|
} |
| 204 |
|
|
| 205 |
|
$class->mapField($mapping); |
| 206 |
|
|
lib/Doctrine/ODM/MongoDB/Mapping/Driver/YamlDriver.php 1 location
|
@@ 159-165 (lines=7) @@
|
| 156 |
|
|
| 157 |
|
private function addFieldMapping(ClassMetadataInfo $class, $mapping) |
| 158 |
|
{ |
| 159 |
|
if (isset($mapping['name'])) { |
| 160 |
|
$name = $mapping['name']; |
| 161 |
|
} elseif (isset($mapping['fieldName'])) { |
| 162 |
|
$name = $mapping['fieldName']; |
| 163 |
|
} else { |
| 164 |
|
throw new \InvalidArgumentException('Cannot infer a MongoDB name from the mapping'); |
| 165 |
|
} |
| 166 |
|
|
| 167 |
|
$class->mapField($mapping); |
| 168 |
|
|