{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/3910","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/3910/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/3910/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/3910/events","html_url":"https://github.com/sequelize/sequelize/issues/3910","id":86937480,"number":3910,"title":"Raw objects in result for findOne.includes","user":{"login":"MikeBazhenov","id":1553430,"avatar_url":"https://avatars.githubusercontent.com/u/1553430?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeBazhenov","html_url":"https://github.com/MikeBazhenov","followers_url":"https://api.github.com/users/MikeBazhenov/followers","following_url":"https://api.github.com/users/MikeBazhenov/following{/other_user}","gists_url":"https://api.github.com/users/MikeBazhenov/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeBazhenov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeBazhenov/subscriptions","organizations_url":"https://api.github.com/users/MikeBazhenov/orgs","repos_url":"https://api.github.com/users/MikeBazhenov/repos","events_url":"https://api.github.com/users/MikeBazhenov/events{/privacy}","received_events_url":"https://api.github.com/users/MikeBazhenov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-10T11:35:27Z","updated_at":"2015-06-10T13:26:44Z","closed_at":null,"body":"When i do request with includes models, request return found object with includes keys as raw object...\r\n\r\nI want that includes keys will be as `Account Model` objects...\r\n\r\n```JavaScript\r\n\r\n//Associations\r\nthis.belongsTo(db.Account, {foreignKey: 'worker_id', as: 'worker'});\r\nthis.belongsTo(db.Company, {foreignKey: 'company_id', as: 'company'});\r\n\r\n//Find \r\nthis.findOne({\r\n  where: {\r\n    id: 123\r\n  },\r\n  include: [\r\n    {\r\n      model: internals.db.Account,\r\n      as: 'account'\r\n    },\r\n    {\r\n      model: internals.db.Account,\r\n      as: 'worker'\r\n    }\r\n  ]\r\n}).then(function(result) {\r\n  console.log(result.worker.toObject()); //will be error toObject is not a function\r\n});\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/110750354","html_url":"https://github.com/sequelize/sequelize/issues/3910#issuecomment-110750354","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/3910","id":110750354,"user":{"login":"janmeier","id":1210224,"avatar_url":"https://avatars.githubusercontent.com/u/1210224?v=3","gravatar_id":"","url":"https://api.github.com/users/janmeier","html_url":"https://github.com/janmeier","followers_url":"https://api.github.com/users/janmeier/followers","following_url":"https://api.github.com/users/janmeier/following{/other_user}","gists_url":"https://api.github.com/users/janmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/janmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janmeier/subscriptions","organizations_url":"https://api.github.com/users/janmeier/orgs","repos_url":"https://api.github.com/users/janmeier/repos","events_url":"https://api.github.com/users/janmeier/events{/privacy}","received_events_url":"https://api.github.com/users/janmeier/received_events","type":"User","site_admin":false},"created_at":"2015-06-10T13:26:44Z","updated_at":"2015-06-10T13:26:44Z","body":"@MikeBazhenov Those model definitions are enormous, and I get several errors when I try to run them. Please try to create a self-contained example"}}