protected function assertField($field)
    {
        if (!$this->hasField($field)) {
            throw new ModelException(sprintf('Unknown field, field "%s" not found in model "%s"', $field, $this->entity));
        }
    }
protected function assertField($field)
    {
        if (!$this->hasField($field)) {
            throw new ModelException(sprintf('Unknown field, field "%s" not found in model "%s"', $field, $this->entity));
        }
    }
protected function assertField ( $ field ) { if ( ! $ this -> hasField ( $ field ) ) { throw new ModelException ( sprintf ( 'Unknown field, field "%s" not found in model "%s"' , $ field , $ this -> entity ) ) ; } }
Asserts if model has field

@param string $field

@throws ModelException
Asserts if model has field