public function getOne($id)
    {
        $result = $this->entity->findFirst($id);
        if ($result->countResults() == 0) {
            // This is bad. Throw a 500. Responses should always be objects.
            throw new HTTPException('Resource not available.', 404, [
                'dev' => 'The resource you requested is not available.',
                'code' => '43758093745021'
            ]);
        } else {
            return $result;
        }
    }
public function getOne($id)
    {
        $result = $this->entity->findFirst($id);
        if ($result->countResults() == 0) {
            // This is bad. Throw a 500. Responses should always be objects.
            throw new HTTPException('Resource not available.', 404, [
                'dev' => 'The resource you requested is not available.',
                'code' => '43758093745021'
            ]);
        } else {
            return $result;
        }
    }
public function getOne ( $ id ) { $ result = $ this -> entity -> findFirst ( $ id ) ; if ( $ result -> countResults ( ) == 0 ) { // This is bad. Throw a 500. Responses should always be objects. throw new HTTPException ( 'Resource not available.' , 404 , [ 'dev' => 'The resource you requested is not available.' , 'code' => '43758093745021' ] ) ; } else { return $ result ; } }
run a limited query for one record
bypass nearly all normal search params and just search by the primary key

special handling if no matching results are found

@param int $id
@throws HTTPException
@return \PhalconRest\Result\Result
run a limited query for one record bypass nearly all normal search params and just search by the primary key