convert all sub relationships back to sql because orms are overrated