{"action":"opened","issue":{"url":"https://api.github.com/repos/hapijs/hapi/issues/2832","labels_url":"https://api.github.com/repos/hapijs/hapi/issues/2832/labels{/name}","comments_url":"https://api.github.com/repos/hapijs/hapi/issues/2832/comments","events_url":"https://api.github.com/repos/hapijs/hapi/issues/2832/events","html_url":"https://github.com/hapijs/hapi/issues/2832","id":110188912,"number":2832,"title":"Server.inject response.result is different to server output when using sequelize","user":{"login":"clarkie","id":2292639,"avatar_url":"https://avatars.githubusercontent.com/u/2292639?v=3","gravatar_id":"","url":"https://api.github.com/users/clarkie","html_url":"https://github.com/clarkie","followers_url":"https://api.github.com/users/clarkie/followers","following_url":"https://api.github.com/users/clarkie/following{/other_user}","gists_url":"https://api.github.com/users/clarkie/gists{/gist_id}","starred_url":"https://api.github.com/users/clarkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clarkie/subscriptions","organizations_url":"https://api.github.com/users/clarkie/orgs","repos_url":"https://api.github.com/users/clarkie/repos","events_url":"https://api.github.com/users/clarkie/events{/privacy}","received_events_url":"https://api.github.com/users/clarkie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-07T09:51:13Z","updated_at":"2015-10-07T09:51:13Z","closed_at":null,"body":" I have the following route handler:\r\n```JS\r\nhandler: function (request, reply) {\r\n    var query = request.db.userToken.findOne({\r\n        include: [request.db.user]\r\n    });\r\n    return reply(query);\r\n}\r\n```\r\nIf I instantiate a server and hit the route it returns the correct userToken JSON structure but if I do a `console.log` from within a `server.inject` callback I get the sequelize object:\r\n\r\n```JS\r\n{ dataValues:\r\n    { id: 35,\r\n    ...\r\n```\r\n\r\nA solution is to add the following to get sequelize to return the raw object\r\n```JS\r\n.then(function (userToken) {\r\n    return userToken.get();\r\n}) \r\n```\r\n... but if Hapi is doing it anyway when a server is instantiated then I'm having to add this purely for the tests which doesn't seem right.\r\n\r\nMy problem is that the following assertion will fail:\r\n```\r\nexpect(response.result).to.include(['user', 'token']);\r\n```"}}