public static function find_revision($id, $timestamp = null, $relations = array())
	{
		if ($timestamp == null)
		{
			return parent::find($id);
		}

		$timestamp_start_name = static::temporal_property('start_column');
		$timestamp_end_name = static::temporal_property('end_column');

		// Select the next latest revision after the requested one then use that
		// to get the revision before.
		self::disable_primary_key_check();

		$query = static::query()
			->where('id', $id)
			->where($timestamp_start_name, '<=', $timestamp)
			->where($timestamp_end_name, '>', $timestamp);
		self::enable_primary_key_check();

		//Make sure the temporal stuff is activated
		$query->set_temporal_properties($timestamp, $timestamp_end_name, $timestamp_start_name);

		foreach ($relations as $relation)
		{
			$query->related($relation);
		}

		$query_result = $query->get_one();

		// If the query did not return a result but null, then we cannot call
		//  set_lazy_timestamp on it without throwing errors
		if ( $query_result !== null )
		{
			$query_result->set_lazy_timestamp($timestamp);
		}
		return $query_result;
	}