public static function one($criteria = array(),$fields = array())
    {

        self::processCriteriaWithType($criteria);
        $result = self::connection()->findOne(static::$collection, $criteria, self::mapFields($fields));

        if ($result) {
            return  Hydrator::hydrate(get_called_class(), $result, Hydrator::TYPE_SINGLE , true);
        }

        return null;
    }
public static function one($criteria = array(),$fields = array())
    {

        self::processCriteriaWithType($criteria);
        $result = self::connection()->findOne(static::$collection, $criteria, self::mapFields($fields));

        if ($result) {
            return  Hydrator::hydrate(get_called_class(), $result, Hydrator::TYPE_SINGLE , true);
        }

        return null;
    }
public static function one ( $ criteria = array ( ) , $ fields = array ( ) ) { self :: processCriteriaWithType ( $ criteria ) ; $ result = self :: connection ( ) -> findOne ( static :: $ collection , $ criteria , self :: mapFields ( $ fields ) ) ; if ( $ result ) { return Hydrator :: hydrate ( get_called_class ( ) , $ result , Hydrator :: TYPE_SINGLE , true ) ; } return null ; }
Retrieve a record

@param array $criteria criteria
@param array $fields fields

@return Model
Retrieve a record