Storm\Core\Relational\IColumn::IsPrimaryKey PHP Метод

IsPrimaryKey() публичный Метод

Whether or not the column is a primary key
public IsPrimaryKey ( ) : boolean
Результат boolean
    public function IsPrimaryKey();

Usage Example

 public function __construct(Object\IDataProperty $DataProperty, Relational\IColumn $Column)
 {
     parent::__construct($DataProperty);
     if ($DataProperty->IsIdentity() && !$Column->IsPrimaryKey()) {
         throw new MappingException('Cannot map an identity property to a non primary key column %s.%s', $Column->GetTable()->GetName(), $Column->GetName());
     } else {
         if ($Column->IsPrimaryKey() && !$DataProperty->IsIdentity()) {
             throw new MappingException('Cannot map an non identity property to a primary key column %s.%s', $Column->GetTable()->GetName(), $Column->GetName());
         } else {
             if ($Column->IsPrimaryKey() && $DataProperty->IsIdentity()) {
                 $this->IsIdentityPrimaryKeyMapping = true;
             }
         }
     }
     $this->DataProperty = $DataProperty;
     $this->Column = $Column;
 }
All Usage Examples Of Storm\Core\Relational\IColumn::IsPrimaryKey