Storm\Core\Mapping\IDataPropertyColumnMapping::GetPersistColumns PHP Method

GetPersistColumns() public method

The columns in which data is persisted.
public GetPersistColumns ( ) : Storm\Core\Relational\IColumn[]
return Storm\Core\Relational\IColumn[]
    public function GetPersistColumns();

Usage Example

 private function AddIdentityPrimaryKeyMapping(IDataPropertyColumnMapping $PropertyMapping)
 {
     //Infer primary key table
     $AllColumns = array_merge($PropertyMapping->GetPersistColumns(), $PropertyMapping->GetReviveColumns());
     if ($this->PrimaryKeyTable === null) {
         $this->PrimaryKeyTable = reset($AllColumns)->GetTable();
     }
     foreach ($AllColumns as $Column) {
         if (!$Column->GetTable()->Is($this->PrimaryKeyTable)) {
             throw new MappingException('Identity properties of %s cannot map across multiple tables: %s.%s does not belong to %s', $this->EntityType, $Column->GetTable()->GetName(), $Column->GetName(), $this->PrimaryKeyTable->GetName());
         }
     }
     $this->IdentityPropertyPrimaryKeyMappings[] = $PropertyMapping;
 }