public function findOneByOrFail($predicate, $combination = Predicate\PredicateSet::OP_AND)
    {
        $record = $this->findOneBy($predicate, $combination);
        if ($record === false) {
            throw new Exception\NotFoundException(__METHOD__ . ": cannot findOneBy record in table '$this->table'");
        }
        return $record;
    }
public function findOneByOrFail($predicate, $combination = Predicate\PredicateSet::OP_AND)
    {
        $record = $this->findOneBy($predicate, $combination);
        if ($record === false) {
            throw new Exception\NotFoundException(__METHOD__ . ": cannot findOneBy record in table '$this->table'");
        }
        return $record;
    }
public function findOneByOrFail ( $ predicate , $ combination = Predicate \ PredicateSet :: OP_AND ) { $ record = $ this -> findOneBy ( $ predicate , $ combination ) ; if ( $ record === false ) { throw new Exception \ NotFoundException ( __METHOD__ . ": cannot findOneBy record in table '$this->table'" ) ; } return $ record ; }
Find a record by unique key and trhow an exception id record cannot be found

@param  Where|\Closure|string|array|Predicate\PredicateInterface $predicate
@param  string $combination One of the OP_* constants from Predicate\PredicateSet

@throws Exception\NotFoundException when the record is not found
@throws Exception\ColumnNotFoundException when a column in the predicate does not exists
@throws Exception\MultipleMatchesException when more than one record match the predicate
@throws Exception\InvalidArgumentException when the predicate is not correct / invalid column

@return Record
Find a record by unique key and trhow an exception id record cannot be found