added query by context id to dao