GapOrm/Mapper/BaseModel.php
public function getPK($require = true)
    {
        foreach ($this->fields as $field) {
            if ($field->pk()) {
                return $field;
            }
        }

        if ($require) {
            throw new NoPKException();
        }
    }
public function getPK($require = true)
    {
        foreach ($this->fields as $field) {
            if ($field->pk()) {
                return $field;
            }
        }

        if ($require) {
            throw new NoPKException();
        }
    }
public function getPK ( $ require = true ) { foreach ( $ this -> fields as $ field ) { if ( $ field -> pk ( ) ) { return $ field ; } } if ( $ require ) { throw new NoPKException ( ) ; } }
Get primary key

@param bool $require
@return mixed
@throws NoPkException
Get primary key