This is mainly used to add inherited association mappings to derived classes.
public addInheritedAssociationMapping ( array $mapping ) : void | ||
$mapping | array | |
Результат | void |
public function testAddInheritedAssociationMapping() { $cm = new ClassMetadataInfo('stdClass'); $mapping = array('fieldName' => 'assoc', 'reference' => true, 'type' => 'one', 'simple' => true); $cm->addInheritedAssociationMapping($mapping); $expected = array('assoc' => $mapping); $this->assertEquals($expected, $cm->associationMappings); }