{"action":"created","comment":{"url":"https://api.github.com/repos/sequelize/sequelize/pulls/comments/22406690","id":22406690,"diff_hunk":"@@ -1044,9 +1044,7 @@ module.exports = (function() {\n       options = { fields: options };\n     }\n \n-    options = Utils._.extend({\n-      transaction: null","path":"lib/model.js","position":5,"original_position":5,"commit_id":"00f9f6c3629663874e203aeded2f8f4b16d8be36","original_commit_id":"00f9f6c3629663874e203aeded2f8f4b16d8be36","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},"body":"I still need to go through the code to find more snippets like this. Passing transaction: null now disables the CLS transaction, so it shouldnt be done anywhere in sequelize code","created_at":"2015-01-02T09:04:38Z","updated_at":"2015-01-02T09:04:38Z","html_url":"https://github.com/sequelize/sequelize/pull/2810#discussion_r22406690","pull_request_url":"https://api.github.com/repos/sequelize/sequelize/pulls/2810","_links":{"self":{"href":"https://api.github.com/repos/sequelize/sequelize/pulls/comments/22406690"},"html":{"href":"https://github.com/sequelize/sequelize/pull/2810#discussion_r22406690"},"pull_request":{"href":"https://api.github.com/repos/sequelize/sequelize/pulls/2810"}}},"pull_request":{"url":"https://api.github.com/repos/sequelize/sequelize/pulls/2810","id":26708757,"html_url":"https://github.com/sequelize/sequelize/pull/2810","diff_url":"https://github.com/sequelize/sequelize/pull/2810.diff","patch_url":"https://github.com/sequelize/sequelize/pull/2810.patch","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/2810","number":2810,"state":"open","locked":false,"title":"CLS support in transactions","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},"body":"This PR adds support for automagically passing the current transaction to all queries within the callback passed to sequelize.transaction. For example:\r\n\r\n```js\r\nsequelize.transaction(function (t) {\r\n  // Normally you'd have to pass { transaction: t }, but CLS handles that automagically\r\n  User.find(where); \r\n\r\n  // To disable automatic passing, pass another transaction, or null for no transaction\r\n  User.find(where, { transaction: t2 });\r\n  User.find(where, { transaction: null });\r\n});\r\n```\r\n\r\nThis is still WIP - I'd like to add docs in this PR as well\r\n\r\nAdresses https://github.com/sequelize/sequelize/issues/2717 and \r\n\r\nCloses https://github.com/sequelize/sequelize/issues/1627","created_at":"2014-12-30T23:16:40Z","updated_at":"2015-01-02T09:04:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb468e51a9c4a4e8a67ae8e17f08ce4d571ac5dc","assignee":null,"milestone":{"url":"https://api.github.com/repos/sequelize/sequelize/milestones/17","labels_url":"https://api.github.com/repos/sequelize/sequelize/milestones/17/labels","id":797782,"number":17,"title":"2.0.0 final release","description":"","creator":{"login":"mickhansen","id":699049,"avatar_url":"https://avatars.githubusercontent.com/u/699049?v=3","gravatar_id":"","url":"https://api.github.com/users/mickhansen","html_url":"https://github.com/mickhansen","followers_url":"https://api.github.com/users/mickhansen/followers","following_url":"https://api.github.com/users/mickhansen/following{/other_user}","gists_url":"https://api.github.com/users/mickhansen/gists{/gist_id}","starred_url":"https://api.github.com/users/mickhansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickhansen/subscriptions","organizations_url":"https://api.github.com/users/mickhansen/orgs","repos_url":"https://api.github.com/users/mickhansen/repos","events_url":"https://api.github.com/users/mickhansen/events{/privacy}","received_events_url":"https://api.github.com/users/mickhansen/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":33,"state":"open","created_at":"2014-09-22T06:21:20Z","updated_at":"2014-12-30T23:16:45Z","due_on":"2016-01-09T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/sequelize/sequelize/pulls/2810/commits","review_comments_url":"https://api.github.com/repos/sequelize/sequelize/pulls/2810/comments","review_comment_url":"https://api.github.com/repos/sequelize/sequelize/pulls/comments/{number}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/2810/comments","statuses_url":"https://api.github.com/repos/sequelize/sequelize/statuses/00f9f6c3629663874e203aeded2f8f4b16d8be36","head":{"label":"janmeier:cls","ref":"cls","sha":"00f9f6c3629663874e203aeded2f8f4b16d8be36","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},"repo":{"id":10360879,"name":"sequelize","full_name":"janmeier/sequelize","owner":{"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},"private":false,"html_url":"https://github.com/janmeier/sequelize","description":"Sequelize is an easy-to-use multi sql dialect object-relationship-mapper for node.js. It currently supports MySQL, SQLite and PostgreSQL.","fork":true,"url":"https://api.github.com/repos/janmeier/sequelize","forks_url":"https://api.github.com/repos/janmeier/sequelize/forks","keys_url":"https://api.github.com/repos/janmeier/sequelize/keys{/key_id}","collaborators_url":"https://api.github.com/repos/janmeier/sequelize/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/janmeier/sequelize/teams","hooks_url":"https://api.github.com/repos/janmeier/sequelize/hooks","issue_events_url":"https://api.github.com/repos/janmeier/sequelize/issues/events{/number}","events_url":"https://api.github.com/repos/janmeier/sequelize/events","assignees_url":"https://api.github.com/repos/janmeier/sequelize/assignees{/user}","branches_url":"https://api.github.com/repos/janmeier/sequelize/branches{/branch}","tags_url":"https://api.github.com/repos/janmeier/sequelize/tags","blobs_url":"https://api.github.com/repos/janmeier/sequelize/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/janmeier/sequelize/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/janmeier/sequelize/git/refs{/sha}","trees_url":"https://api.github.com/repos/janmeier/sequelize/git/trees{/sha}","statuses_url":"https://api.github.com/repos/janmeier/sequelize/statuses/{sha}","languages_url":"https://api.github.com/repos/janmeier/sequelize/languages","stargazers_url":"https://api.github.com/repos/janmeier/sequelize/stargazers","contributors_url":"https://api.github.com/repos/janmeier/sequelize/contributors","subscribers_url":"https://api.github.com/repos/janmeier/sequelize/subscribers","subscription_url":"https://api.github.com/repos/janmeier/sequelize/subscription","commits_url":"https://api.github.com/repos/janmeier/sequelize/commits{/sha}","git_commits_url":"https://api.github.com/repos/janmeier/sequelize/git/commits{/sha}","comments_url":"https://api.github.com/repos/janmeier/sequelize/comments{/number}","issue_comment_url":"https://api.github.com/repos/janmeier/sequelize/issues/comments/{number}","contents_url":"https://api.github.com/repos/janmeier/sequelize/contents/{+path}","compare_url":"https://api.github.com/repos/janmeier/sequelize/compare/{base}...{head}","merges_url":"https://api.github.com/repos/janmeier/sequelize/merges","archive_url":"https://api.github.com/repos/janmeier/sequelize/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/janmeier/sequelize/downloads","issues_url":"https://api.github.com/repos/janmeier/sequelize/issues{/number}","pulls_url":"https://api.github.com/repos/janmeier/sequelize/pulls{/number}","milestones_url":"https://api.github.com/repos/janmeier/sequelize/milestones{/number}","notifications_url":"https://api.github.com/repos/janmeier/sequelize/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/janmeier/sequelize/labels{/name}","releases_url":"https://api.github.com/repos/janmeier/sequelize/releases{/id}","created_at":"2013-05-29T14:00:11Z","updated_at":"2014-12-29T14:14:14Z","pushed_at":"2014-12-30T23:08:47Z","git_url":"git://github.com/janmeier/sequelize.git","ssh_url":"git@github.com:janmeier/sequelize.git","clone_url":"https://github.com/janmeier/sequelize.git","svn_url":"https://github.com/janmeier/sequelize","homepage":"http://www.sequelizejs.com","size":11741,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sequelize:master","ref":"master","sha":"8697d32e213d4d9f8bf4dc832d3d4531deb6a480","user":{"login":"sequelize","id":3591786,"avatar_url":"https://avatars.githubusercontent.com/u/3591786?v=3","gravatar_id":"","url":"https://api.github.com/users/sequelize","html_url":"https://github.com/sequelize","followers_url":"https://api.github.com/users/sequelize/followers","following_url":"https://api.github.com/users/sequelize/following{/other_user}","gists_url":"https://api.github.com/users/sequelize/gists{/gist_id}","starred_url":"https://api.github.com/users/sequelize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sequelize/subscriptions","organizations_url":"https://api.github.com/users/sequelize/orgs","repos_url":"https://api.github.com/users/sequelize/repos","events_url":"https://api.github.com/users/sequelize/events{/privacy}","received_events_url":"https://api.github.com/users/sequelize/received_events","type":"Organization","site_admin":false},"repo":{"id":790359,"name":"sequelize","full_name":"sequelize/sequelize","owner":{"login":"sequelize","id":3591786,"avatar_url":"https://avatars.githubusercontent.com/u/3591786?v=3","gravatar_id":"","url":"https://api.github.com/users/sequelize","html_url":"https://github.com/sequelize","followers_url":"https://api.github.com/users/sequelize/followers","following_url":"https://api.github.com/users/sequelize/following{/other_user}","gists_url":"https://api.github.com/users/sequelize/gists{/gist_id}","starred_url":"https://api.github.com/users/sequelize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sequelize/subscriptions","organizations_url":"https://api.github.com/users/sequelize/orgs","repos_url":"https://api.github.com/users/sequelize/repos","events_url":"https://api.github.com/users/sequelize/events{/privacy}","received_events_url":"https://api.github.com/users/sequelize/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sequelize/sequelize","description":"Sequelize is an easy-to-use multi sql dialect object-relationship-mapper for node.js. It currently supports MySQL, MariaDB, SQLite, PostgreSQL and MSSQL.","fork":false,"url":"https://api.github.com/repos/sequelize/sequelize","forks_url":"https://api.github.com/repos/sequelize/sequelize/forks","keys_url":"https://api.github.com/repos/sequelize/sequelize/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sequelize/sequelize/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sequelize/sequelize/teams","hooks_url":"https://api.github.com/repos/sequelize/sequelize/hooks","issue_events_url":"https://api.github.com/repos/sequelize/sequelize/issues/events{/number}","events_url":"https://api.github.com/repos/sequelize/sequelize/events","assignees_url":"https://api.github.com/repos/sequelize/sequelize/assignees{/user}","branches_url":"https://api.github.com/repos/sequelize/sequelize/branches{/branch}","tags_url":"https://api.github.com/repos/sequelize/sequelize/tags","blobs_url":"https://api.github.com/repos/sequelize/sequelize/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sequelize/sequelize/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sequelize/sequelize/git/refs{/sha}","trees_url":"https://api.github.com/repos/sequelize/sequelize/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sequelize/sequelize/statuses/{sha}","languages_url":"https://api.github.com/repos/sequelize/sequelize/languages","stargazers_url":"https://api.github.com/repos/sequelize/sequelize/stargazers","contributors_url":"https://api.github.com/repos/sequelize/sequelize/contributors","subscribers_url":"https://api.github.com/repos/sequelize/sequelize/subscribers","subscription_url":"https://api.github.com/repos/sequelize/sequelize/subscription","commits_url":"https://api.github.com/repos/sequelize/sequelize/commits{/sha}","git_commits_url":"https://api.github.com/repos/sequelize/sequelize/git/commits{/sha}","comments_url":"https://api.github.com/repos/sequelize/sequelize/comments{/number}","issue_comment_url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/{number}","contents_url":"https://api.github.com/repos/sequelize/sequelize/contents/{+path}","compare_url":"https://api.github.com/repos/sequelize/sequelize/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sequelize/sequelize/merges","archive_url":"https://api.github.com/repos/sequelize/sequelize/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sequelize/sequelize/downloads","issues_url":"https://api.github.com/repos/sequelize/sequelize/issues{/number}","pulls_url":"https://api.github.com/repos/sequelize/sequelize/pulls{/number}","milestones_url":"https://api.github.com/repos/sequelize/sequelize/milestones{/number}","notifications_url":"https://api.github.com/repos/sequelize/sequelize/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sequelize/sequelize/labels{/name}","releases_url":"https://api.github.com/repos/sequelize/sequelize/releases{/id}","created_at":"2010-07-22T07:11:11Z","updated_at":"2015-01-01T21:58:28Z","pushed_at":"2014-12-30T19:06:12Z","git_url":"git://github.com/sequelize/sequelize.git","ssh_url":"git@github.com:sequelize/sequelize.git","clone_url":"https://github.com/sequelize/sequelize.git","svn_url":"https://github.com/sequelize/sequelize","homepage":"http://sequelizejs.com","size":48675,"stargazers_count":2981,"watchers_count":2981,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":679,"mirror_url":null,"open_issues_count":287,"forks":679,"open_issues":287,"watchers":2981,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sequelize/sequelize/pulls/2810"},"html":{"href":"https://github.com/sequelize/sequelize/pull/2810"},"issue":{"href":"https://api.github.com/repos/sequelize/sequelize/issues/2810"},"comments":{"href":"https://api.github.com/repos/sequelize/sequelize/issues/2810/comments"},"review_comments":{"href":"https://api.github.com/repos/sequelize/sequelize/pulls/2810/comments"},"review_comment":{"href":"https://api.github.com/repos/sequelize/sequelize/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/sequelize/sequelize/pulls/2810/commits"},"statuses":{"href":"https://api.github.com/repos/sequelize/sequelize/statuses/00f9f6c3629663874e203aeded2f8f4b16d8be36"}}}}