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