INTERNAL:
Sets the mapped identifier field of this class.
public setIdentifier ( string $identifier ) | ||
$identifier | string |
/** * @expectedException \Doctrine\ODM\MongoDB\Mapping\MappingException * @expectedExceptionMessage stdClass::id was declared an identifier and must stay this way. */ public function testIdFieldsTypeMustNotBeOverridden() { $cm = new ClassMetadataInfo('stdClass'); $cm->setIdentifier('id'); $cm->mapField(array('fieldName' => 'id', 'type' => 'string')); }