Initialize() public method

Intialize the property mapping in the context of the parent domain database map.
public Initialize ( DomainDatabaseMap $DomainDatabaseMap ) : void
$DomainDatabaseMap DomainDatabaseMap The parent domain database map
return void
示例#1
0
 /**
  * Adds an entity relational map instance to this domain database map.
  * 
  * @param IEntityRelationalMap $EntityRelationalMap The entity relational mapping class.
  * @throws MappingException If the entity is not part of the given domain
  */
 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;
 }