{"action":"opened","issue":{"url":"https://api.github.com/repos/OpenKitten/MongoKitten/issues/80","repository_url":"https://api.github.com/repos/OpenKitten/MongoKitten","labels_url":"https://api.github.com/repos/OpenKitten/MongoKitten/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/OpenKitten/MongoKitten/issues/80/comments","events_url":"https://api.github.com/repos/OpenKitten/MongoKitten/issues/80/events","html_url":"https://github.com/OpenKitten/MongoKitten/issues/80","id":197255434,"number":80,"title":"Aggregation: Lookup doesn't work for array fields","user":{"login":"mollywoodnini","id":5786065,"avatar_url":"https://avatars.githubusercontent.com/u/5786065?v=3","gravatar_id":"","url":"https://api.github.com/users/mollywoodnini","html_url":"https://github.com/mollywoodnini","followers_url":"https://api.github.com/users/mollywoodnini/followers","following_url":"https://api.github.com/users/mollywoodnini/following{/other_user}","gists_url":"https://api.github.com/users/mollywoodnini/gists{/gist_id}","starred_url":"https://api.github.com/users/mollywoodnini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mollywoodnini/subscriptions","organizations_url":"https://api.github.com/users/mollywoodnini/orgs","repos_url":"https://api.github.com/users/mollywoodnini/repos","events_url":"https://api.github.com/users/mollywoodnini/events{/privacy}","received_events_url":"https://api.github.com/users/mollywoodnini/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-22T20:00:38Z","updated_at":"2016-12-22T20:00:38Z","closed_at":null,"body":"Hi there,\r\n\r\nVersion: MongoKitten 3.0\r\n\r\nI am trying to do a lookup regarding this docs: https://docs.mongodb.com/v3.2/reference/operator/aggregation/lookup/\r\n\r\nThe lookup aggregation in MongoKitten 3 works great when localField and foreignField are single elements. But it doesn't work for array elements.\r\n\r\nIn the following example the localField 'specs' and foreignField 'size' are array elements:\r\n`\r\nlet lookup = AggregationPipeline.Stage.lookup(fromCollection: inventoryCollection, localField: \"specs\", foreignField: \"size\", as: \"inventory_docs\")\r\nlet pipe = AggregationPipeline(arrayLiteral: lookup)\r\n\r\nlet document = try inventoryCollection.aggregate(pipeline: pipe).makeDocument()\r\n`\r\nAfter the aggregation the document field \"inventory_docs\" is just an empty array.\r\n\r\nAm I doing something wrong or is this a bug? Thanks.\r\n\r\nCheers,\r\nNini"}}
{"actor":{"display_login":"mollywoodnini"}}