{"action":"closed","issue":{"url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose/issues/78","labels_url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose/issues/78/comments","events_url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose/issues/78/events","html_url":"https://github.com/florianholzapfel/express-restify-mongoose/issues/78","id":47675455,"number":78,"title":"query on populated field","user":{"login":"summer-liu","id":3375722,"avatar_url":"https://avatars.githubusercontent.com/u/3375722?v=3","gravatar_id":"","url":"https://api.github.com/users/summer-liu","html_url":"https://github.com/summer-liu","followers_url":"https://api.github.com/users/summer-liu/followers","following_url":"https://api.github.com/users/summer-liu/following{/other_user}","gists_url":"https://api.github.com/users/summer-liu/gists{/gist_id}","starred_url":"https://api.github.com/users/summer-liu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/summer-liu/subscriptions","organizations_url":"https://api.github.com/users/summer-liu/orgs","repos_url":"https://api.github.com/users/summer-liu/repos","events_url":"https://api.github.com/users/summer-liu/events{/privacy}","received_events_url":"https://api.github.com/users/summer-liu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose/labels/feature","name":"feature","color":"009800"},{"url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose/labels/v2.0","name":"v2.0","color":"000000"}],"state":"closed","locked":false,"assignee":{"login":"florianholzapfel","id":1162833,"avatar_url":"https://avatars.githubusercontent.com/u/1162833?v=3","gravatar_id":"","url":"https://api.github.com/users/florianholzapfel","html_url":"https://github.com/florianholzapfel","followers_url":"https://api.github.com/users/florianholzapfel/followers","following_url":"https://api.github.com/users/florianholzapfel/following{/other_user}","gists_url":"https://api.github.com/users/florianholzapfel/gists{/gist_id}","starred_url":"https://api.github.com/users/florianholzapfel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florianholzapfel/subscriptions","organizations_url":"https://api.github.com/users/florianholzapfel/orgs","repos_url":"https://api.github.com/users/florianholzapfel/repos","events_url":"https://api.github.com/users/florianholzapfel/events{/privacy}","received_events_url":"https://api.github.com/users/florianholzapfel/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2014-11-04T03:54:30Z","updated_at":"2015-10-02T16:31:31Z","closed_at":"2015-10-02T16:31:31Z","body":"Is that possible to query on populated field? \r\n\r\nSay I have a collection with the schema like this:\r\n\r\n```\r\nvar recordSchema = new Schema({\r\n\tstudent: {\r\n\t type:Schema.Types.ObjectId,\r\n\t ref: 'User'\r\n\t }\r\n\t .......\r\n})\r\n```\r\n\r\nand in User model there is a field \"school\".\r\n\r\nI want to do a query like this:\r\n```\r\n/records?populate=student&student.school=2340544234\r\n```\r\nbut it says there is TypeError: Cannot read property 'paths' of undefined.\r\n\r\nHow can I do that with Express Restify Mongoose? "}}