{"action":"created","issue":{"url":"https://api.github.com/repos/lightblue-platform/lightblue-core/issues/347","labels_url":"https://api.github.com/repos/lightblue-platform/lightblue-core/issues/347/labels{/name}","comments_url":"https://api.github.com/repos/lightblue-platform/lightblue-core/issues/347/comments","events_url":"https://api.github.com/repos/lightblue-platform/lightblue-core/issues/347/events","html_url":"https://github.com/lightblue-platform/lightblue-core/issues/347","id":62452645,"number":347,"title":"Lightblue returns empty objects {} when using projection queries","user":{"login":"paterczm","id":4681035,"avatar_url":"https://avatars.githubusercontent.com/u/4681035?v=3","gravatar_id":"","url":"https://api.github.com/users/paterczm","html_url":"https://github.com/paterczm","followers_url":"https://api.github.com/users/paterczm/followers","following_url":"https://api.github.com/users/paterczm/following{/other_user}","gists_url":"https://api.github.com/users/paterczm/gists{/gist_id}","starred_url":"https://api.github.com/users/paterczm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paterczm/subscriptions","organizations_url":"https://api.github.com/users/paterczm/orgs","repos_url":"https://api.github.com/users/paterczm/repos","events_url":"https://api.github.com/users/paterczm/events{/privacy}","received_events_url":"https://api.github.com/users/paterczm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-17T16:41:21Z","updated_at":"2015-03-17T18:50:00Z","closed_at":null,"body":"Query:\r\n```\r\n{\r\n    \"projection\": [\r\n        {\r\n            \"field\": \"_id\",\r\n            \"include\": \"true\"\r\n        },\r\n        {\r\n            \"field\": \"termsVerbiage.*.termsVerbiageTranslation\",\r\n            \"include\": \"true\",\r\n            \"recursive\": \"true\",\r\n            \"match\": {\r\n                \"field\": \"uid\",\r\n                \"op\": \"=\",\r\n                \"rvalue\": \"1509\"\r\n            }\r\n        }\r\n    ],\r\n    \"query\": {\r\n        \"field\": \"termsVerbiage.*.termsVerbiageTranslation.*.uid\",\r\n        \"op\": \"=\",\r\n        \"rvalue\": \"1509\"\r\n    }\r\n}\r\n```\r\n\r\nResult:\r\n```\r\n{\r\n    \"matchCount\": 1,\r\n    \"modifiedCount\": 0,\r\n    \"processed\": [\r\n        {\r\n            \"_id\": \"1\",\r\n            \"termsVerbiage\": [\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": [\r\n                        {\r\n                            \"localeCodeText\": \"en\",\r\n                            \"statusCode\": \"active\",\r\n                            \"uid\": \"1509\",\r\n                            \"url\": \"http://...\",\r\n                            \"versionSeq\": 1\r\n                        }\r\n                    ]\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                },\r\n                {\r\n                    \"termsVerbiageTranslation\": []\r\n                }\r\n            ]\r\n        }\r\n    ],\r\n    \"status\": \"COMPLETE\"\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/lightblue-platform/lightblue-core/issues/comments/82524459","html_url":"https://github.com/lightblue-platform/lightblue-core/issues/347#issuecomment-82524459","issue_url":"https://api.github.com/repos/lightblue-platform/lightblue-core/issues/347","id":82524459,"user":{"login":"bserdar","id":3670797,"avatar_url":"https://avatars.githubusercontent.com/u/3670797?v=3","gravatar_id":"","url":"https://api.github.com/users/bserdar","html_url":"https://github.com/bserdar","followers_url":"https://api.github.com/users/bserdar/followers","following_url":"https://api.github.com/users/bserdar/following{/other_user}","gists_url":"https://api.github.com/users/bserdar/gists{/gist_id}","starred_url":"https://api.github.com/users/bserdar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bserdar/subscriptions","organizations_url":"https://api.github.com/users/bserdar/orgs","repos_url":"https://api.github.com/users/bserdar/repos","events_url":"https://api.github.com/users/bserdar/events{/privacy}","received_events_url":"https://api.github.com/users/bserdar/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T18:50:00Z","updated_at":"2015-03-17T18:50:00Z","body":"This is a bug in Projector.project. The problem is we decide if a field needs to be projected before deciding whether any descendants of that field will be projected. Instead, we should decide to include an ancestor of a field once we decide to include the field."}}