{"action":"created","issue":{"url":"https://api.github.com/repos/feathersjs/feathers-mongoose/issues/51","repository_url":"https://api.github.com/repos/feathersjs/feathers-mongoose","labels_url":"https://api.github.com/repos/feathersjs/feathers-mongoose/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/feathersjs/feathers-mongoose/issues/51/comments","events_url":"https://api.github.com/repos/feathersjs/feathers-mongoose/issues/51/events","html_url":"https://github.com/feathersjs/feathers-mongoose/issues/51","id":132295151,"number":51,"title":"use .lean() liberally in fetch's?","user":{"login":"jamesjnadeau","id":2386054,"avatar_url":"https://avatars.githubusercontent.com/u/2386054?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesjnadeau","html_url":"https://github.com/jamesjnadeau","followers_url":"https://api.github.com/users/jamesjnadeau/followers","following_url":"https://api.github.com/users/jamesjnadeau/following{/other_user}","gists_url":"https://api.github.com/users/jamesjnadeau/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesjnadeau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesjnadeau/subscriptions","organizations_url":"https://api.github.com/users/jamesjnadeau/orgs","repos_url":"https://api.github.com/users/jamesjnadeau/repos","events_url":"https://api.github.com/users/jamesjnadeau/events{/privacy}","received_events_url":"https://api.github.com/users/jamesjnadeau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-09T00:13:31Z","updated_at":"2016-02-09T05:01:59Z","closed_at":null,"body":"I would argue that a lot of the time, you don't need to fetch a full mongoose doc, and fetching a regular object without the mongoose overhead would be a great performance feature/optimization.\r\n\r\nI think there should be a query param called `$lean` that defaults to being set to true. \r\n\r\nWhen `$lean` is false, real mongoose objects are created, and this note would still actually apply:\r\nhttp://docs.feathersjs.com/databases/mongoose.html#modifying-results-with-the-toobject-hook\r\n\r\nThis way it would highlight what to do if you need to actually work with the mongoose object, but still provide the most performance by default. \r\n\r\nJust an idea I had while looking through the source and from my own experience. Feel free to ignore, I won't have time/energy to work on anytime soon.\r\n\r\nThanks for this awesome project guys! Good work! :+1: :rocket: :guitar: \r\n"},"comment":{"url":"https://api.github.com/repos/feathersjs/feathers-mongoose/issues/comments/181711721","html_url":"https://github.com/feathersjs/feathers-mongoose/issues/51#issuecomment-181711721","issue_url":"https://api.github.com/repos/feathersjs/feathers-mongoose/issues/51","id":181711721,"user":{"login":"daffl","id":338316,"avatar_url":"https://avatars.githubusercontent.com/u/338316?v=3","gravatar_id":"","url":"https://api.github.com/users/daffl","html_url":"https://github.com/daffl","followers_url":"https://api.github.com/users/daffl/followers","following_url":"https://api.github.com/users/daffl/following{/other_user}","gists_url":"https://api.github.com/users/daffl/gists{/gist_id}","starred_url":"https://api.github.com/users/daffl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daffl/subscriptions","organizations_url":"https://api.github.com/users/daffl/orgs","repos_url":"https://api.github.com/users/daffl/repos","events_url":"https://api.github.com/users/daffl/events{/privacy}","received_events_url":"https://api.github.com/users/daffl/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T05:01:59Z","updated_at":"2016-02-09T05:01:59Z","body":"If we make `{ lean: true }` an options flag (instead of the default) we don't even have to publish a new major version and it could go in fairly quick."}}