{"action":"created","issue":{"url":"https://api.github.com/repos/dchester/epilogue/issues/91","labels_url":"https://api.github.com/repos/dchester/epilogue/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/dchester/epilogue/issues/91/comments","events_url":"https://api.github.com/repos/dchester/epilogue/issues/91/events","html_url":"https://github.com/dchester/epilogue/pull/91","id":104101970,"number":91,"title":"Add support for altering base query options via context.options","user":{"login":"ackerdev","id":2708892,"avatar_url":"https://avatars.githubusercontent.com/u/2708892?v=3","gravatar_id":"","url":"https://api.github.com/users/ackerdev","html_url":"https://github.com/ackerdev","followers_url":"https://api.github.com/users/ackerdev/followers","following_url":"https://api.github.com/users/ackerdev/following{/other_user}","gists_url":"https://api.github.com/users/ackerdev/gists{/gist_id}","starred_url":"https://api.github.com/users/ackerdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ackerdev/subscriptions","organizations_url":"https://api.github.com/users/ackerdev/orgs","repos_url":"https://api.github.com/users/ackerdev/repos","events_url":"https://api.github.com/users/ackerdev/events{/privacy}","received_events_url":"https://api.github.com/users/ackerdev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-31T18:00:35Z","updated_at":"2015-08-31T18:15:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dchester/epilogue/pulls/91","html_url":"https://github.com/dchester/epilogue/pull/91","diff_url":"https://github.com/dchester/epilogue/pull/91.diff","patch_url":"https://github.com/dchester/epilogue/pull/91.patch"},"body":"This patch adds access to the `context.options` object before the fetch milestone, which allows the user to pass in custom query options before the find query is executed.\r\n\r\nThis is useful for a variety of reasons, allowing users to alter base sequelize query options like `attributes` or `transaction` and `lock`, but will also allow for more flexible integration with custom sequelize addons that may add other custom query options.\r\n\r\nOffering similar options for create/update/delete in the future would likely be a good idea, but this patch simply only adds it for the read/list actions."},"comment":{"url":"https://api.github.com/repos/dchester/epilogue/issues/comments/136450920","html_url":"https://github.com/dchester/epilogue/pull/91#issuecomment-136450920","issue_url":"https://api.github.com/repos/dchester/epilogue/issues/91","id":136450920,"user":{"login":"mbroadst","id":312966,"avatar_url":"https://avatars.githubusercontent.com/u/312966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbroadst","html_url":"https://github.com/mbroadst","followers_url":"https://api.github.com/users/mbroadst/followers","following_url":"https://api.github.com/users/mbroadst/following{/other_user}","gists_url":"https://api.github.com/users/mbroadst/gists{/gist_id}","starred_url":"https://api.github.com/users/mbroadst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbroadst/subscriptions","organizations_url":"https://api.github.com/users/mbroadst/orgs","repos_url":"https://api.github.com/users/mbroadst/repos","events_url":"https://api.github.com/users/mbroadst/events{/privacy}","received_events_url":"https://api.github.com/users/mbroadst/received_events","type":"User","site_admin":false},"created_at":"2015-08-31T18:15:43Z","updated_at":"2015-08-31T18:15:43Z","body":"Right, so in the case of [update](https://github.com/dchester/epilogue/blob/master/lib/Controllers/update.js#L20) for instance, we use the ReadController's `fetch` method in order to get the instance, and then do an update on the result of that. Your fix will automatically work with update now, and will also pass the \"options\" in the context along as well if we want to continue to improve support for this during update's `write` method. The delete controller can use the ReadController's `fetch` as well, that was all I was saying."}}