fix sql syntax exception on getting activity details when has no ids to pass to dao find