add tests for complex query with 'id' key