public function get_one()
	{
		// save the current limits
		$limit = $this->limit;
		$rows_limit = $this->rows_limit;

		if ($this->rows_limit !== null)
		{
			$this->limit = null;
			$this->rows_limit = 1;
		}
		else
		{
			$this->limit = 1;
			$this->rows_limit = null;
		}

		// get the result using normal find
		$result = $this->get();

		// put back the old limits
		$this->limit = $limit;
		$this->rows_limit = $rows_limit;

		return $result ? reset($result) : null;
	}
public function get_one()
	{
		// save the current limits
		$limit = $this->limit;
		$rows_limit = $this->rows_limit;

		if ($this->rows_limit !== null)
		{
			$this->limit = null;
			$this->rows_limit = 1;
		}
		else
		{
			$this->limit = 1;
			$this->rows_limit = null;
		}

		// get the result using normal find
		$result = $this->get();

		// put back the old limits
		$this->limit = $limit;
		$this->rows_limit = $rows_limit;

		return $result ? reset($result) : null;
	}
public function get_one ( ) { // save the current limits $ limit = $ this -> limit ; $ rows_limit = $ this -> rows_limit ; if ( $ this -> rows_limit !== null ) { $ this -> limit = null ; $ this -> rows_limit = 1 ; } else { $ this -> limit = 1 ; $ this -> rows_limit = null ; } // get the result using normal find $ result = $ this -> get ( ) ; // put back the old limits $ this -> limit = $ limit ; $ this -> rows_limit = $ rows_limit ; return $ result ? reset ( $ result ) : null ; }
Build the query and return single object hydrated

@return  Model
Build the query and return single object hydrated