Storm\Core\Mapping\DomainDatabaseMap::AddEntityRelationMap PHP Method

AddEntityRelationMap() private method

Adds an entity relational map instance to this domain database map.
private AddEntityRelationMap ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap )
$EntityRelationalMap Storm\Core\Mapping\IEntityRelationalMap The entity relational mapping class.
    private function AddEntityRelationMap(IEntityRelationalMap $EntityRelationalMap)
    {
        $EntityRelationalMap->Initialize($this);
        $EntityType = $EntityRelationalMap->GetEntityType();
        if (!$this->Domain->HasEntityMap($EntityType)) {
            throw new MappingException('The supplied entity relational map for %s is not part of the given domain.', $EntityType);
        }
        $this->EntityRelationMaps[$EntityType] = $EntityRelationalMap;
        $this->EntityRelationMapsByPrimaryKeyTable[$EntityRelationalMap->GetPrimaryKeyTable()->GetName()] = $EntityRelationalMap;
    }