{"action":"opened","issue":{"url":"https://api.github.com/repos/keystonejs/keystone/issues/1629","labels_url":"https://api.github.com/repos/keystonejs/keystone/issues/1629/labels{/name}","comments_url":"https://api.github.com/repos/keystonejs/keystone/issues/1629/comments","events_url":"https://api.github.com/repos/keystonejs/keystone/issues/1629/events","html_url":"https://github.com/keystonejs/keystone/issues/1629","id":103935942,"number":1629,"title":"Now able to query db from keystone lists","user":{"login":"ishandutta2007","id":2527354,"avatar_url":"https://avatars.githubusercontent.com/u/2527354?v=3","gravatar_id":"","url":"https://api.github.com/users/ishandutta2007","html_url":"https://github.com/ishandutta2007","followers_url":"https://api.github.com/users/ishandutta2007/followers","following_url":"https://api.github.com/users/ishandutta2007/following{/other_user}","gists_url":"https://api.github.com/users/ishandutta2007/gists{/gist_id}","starred_url":"https://api.github.com/users/ishandutta2007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ishandutta2007/subscriptions","organizations_url":"https://api.github.com/users/ishandutta2007/orgs","repos_url":"https://api.github.com/users/ishandutta2007/repos","events_url":"https://api.github.com/users/ishandutta2007/events{/privacy}","received_events_url":"https://api.github.com/users/ishandutta2007/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-30T17:43:03Z","updated_at":"2015-08-30T17:43:03Z","closed_at":null,"body":"=========\r\nMy routes method\r\n=========\r\n  PortfolioBalance.model.find( )\r\n    .sort('-_id')\r\n    .exec(function(err, results) {\r\n      if(err) {console.log(\"Error =\");throw err;}\r\n      console.log(\"PortfolioBalance =\" + results);\r\n      res.json(results);\r\n    });\r\n=========\r\nAnd my model looks like:\r\n=========\r\nvar PortfolioBalance = new keystone.List('PortfolioBalance', {\r\n  track: true,\r\n  autokey: { path: 'key', from: 'name', unique: true }\r\n});\r\n\r\nPortfolioBalance.add({\r\n  user_id: { type: Types.Name, required: true, default: \"1234\" },\r\n  date: { type: Types.Date, required: true, default: Date.now },\r\n  cash_added_withdrawn_today: { type: Types.Number },\r\n  cash_used: { type: Types.Number },\r\n  cash_free: { type: Types.Number },\r\n  bought_today: { type: Types.Number },\r\n  sold_today: { type: Types.Number }\r\n});\r\n\r\nPortfolioBalance.defaultColumns = 'user_id, date, cash_added_withdrawn_today', 'cash_used', 'cash_free', 'bought_today', 'sold_today';\r\nPortfolioBalance.register();\r\n"}}