public function belongsTo($refClass, $forColumn = null)
	{
		// Get columns
		$refTable = $refClass::tableName();
		$forTable = static::tableName();
		$refColumn = $refClass::$idColumn;
		$forColumn = $forColumn ?: strtolower($refClass::modelName())."_id";

		$rows = Db::query("
			select R.*
			from $refTable as R, $forTable as F
			where R.$refColumn = F.$forColumn and F.$forColumn = :id
		", ["id" => $this->$forColumn], static::getDbName());

		if ($rows === false)
			return false;
		if (empty($rows))
			return null;
		
		$refModel = new $refClass;
		foreach ($rows[0] as $col => $val) $refModel->$col = $refModel->decodeValue($val, $col);
		return $refModel;
	}