protected function decodeValue($val, $column = "")
	{
		if ($column === static::$idColumn)
			$val = (int)$val;
		else if (isset(static::$casts[$column]))
		{
			switch (static::$casts[$column])
			{
				case "object":
					$val = from_json($val, false);
					break;
				case "array":
					$val = from_json($val, true);
					break;
				default:
					settype($val, static::$casts[$column]);
			}
		}
		/// We leave it for compatibility
		else if (in_array($column, static::$jsons) && is_string($val))
			$val = from_json($val);
		
		return $val;
	}