{"action":"created","comment":{"url":"https://api.github.com/repos/phalcon/incubator/pulls/comments/39351031","id":39351031,"diff_hunk":"@@ -67,6 +76,14 @@ public function missingMethod(ModelInterface $model, $method, $arguments = null)\n             return null;\n         }\n \n+        if (!$this->db) {\n+            if ($model->getDi()->has('db')) {\n+                $this->db = $model->getDi()->get('db');\n+            } else {\n+                throw new \\Exception('Undefined database handler.');","path":"Library/Phalcon/Mvc/Model/Behavior/NestedSet.php","position":43,"original_position":34,"commit_id":"e7a383d9c15e3a1930e01f4fe99cfac00e394446","original_commit_id":"5d66a25bb9fbaadc01b6503855ff34f28e3f0326","user":{"login":"sergeyklay","id":1256298,"avatar_url":"https://avatars.githubusercontent.com/u/1256298?v=3","gravatar_id":"","url":"https://api.github.com/users/sergeyklay","html_url":"https://github.com/sergeyklay","followers_url":"https://api.github.com/users/sergeyklay/followers","following_url":"https://api.github.com/users/sergeyklay/following{/other_user}","gists_url":"https://api.github.com/users/sergeyklay/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeyklay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeyklay/subscriptions","organizations_url":"https://api.github.com/users/sergeyklay/orgs","repos_url":"https://api.github.com/users/sergeyklay/repos","events_url":"https://api.github.com/users/sergeyklay/events{/privacy}","received_events_url":"https://api.github.com/users/sergeyklay/received_events","type":"User","site_admin":false},"body":"Okay. Now just squash please all commits into a single commit to keep the history clean.","created_at":"2015-09-13T19:32:27Z","updated_at":"2015-09-13T19:32:27Z","html_url":"https://github.com/phalcon/incubator/pull/425#discussion_r39351031","pull_request_url":"https://api.github.com/repos/phalcon/incubator/pulls/425","_links":{"self":{"href":"https://api.github.com/repos/phalcon/incubator/pulls/comments/39351031"},"html":{"href":"https://github.com/phalcon/incubator/pull/425#discussion_r39351031"},"pull_request":{"href":"https://api.github.com/repos/phalcon/incubator/pulls/425"}}},"pull_request":{"url":"https://api.github.com/repos/phalcon/incubator/pulls/425","id":44875655,"html_url":"https://github.com/phalcon/incubator/pull/425","diff_url":"https://github.com/phalcon/incubator/pull/425.diff","patch_url":"https://github.com/phalcon/incubator/pull/425.patch","issue_url":"https://api.github.com/repos/phalcon/incubator/issues/425","number":425,"state":"open","locked":false,"title":"Issue #424.","user":{"login":"temuri416","id":3987203,"avatar_url":"https://avatars.githubusercontent.com/u/3987203?v=3","gravatar_id":"","url":"https://api.github.com/users/temuri416","html_url":"https://github.com/temuri416","followers_url":"https://api.github.com/users/temuri416/followers","following_url":"https://api.github.com/users/temuri416/following{/other_user}","gists_url":"https://api.github.com/users/temuri416/gists{/gist_id}","starred_url":"https://api.github.com/users/temuri416/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/temuri416/subscriptions","organizations_url":"https://api.github.com/users/temuri416/orgs","repos_url":"https://api.github.com/users/temuri416/repos","events_url":"https://api.github.com/users/temuri416/events{/privacy}","received_events_url":"https://api.github.com/users/temuri416/received_events","type":"User","site_admin":false},"body":"Allow custom DB handler via Behaviour's constructor.","created_at":"2015-09-13T16:23:07Z","updated_at":"2015-09-13T19:32:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"42c8302a1a53965ef7ecb96f00914b379f62ce3b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/phalcon/incubator/pulls/425/commits","review_comments_url":"https://api.github.com/repos/phalcon/incubator/pulls/425/comments","review_comment_url":"https://api.github.com/repos/phalcon/incubator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phalcon/incubator/issues/425/comments","statuses_url":"https://api.github.com/repos/phalcon/incubator/statuses/e7a383d9c15e3a1930e01f4fe99cfac00e394446","head":{"label":"temuri416:2.0.x","ref":"2.0.x","sha":"e7a383d9c15e3a1930e01f4fe99cfac00e394446","user":{"login":"temuri416","id":3987203,"avatar_url":"https://avatars.githubusercontent.com/u/3987203?v=3","gravatar_id":"","url":"https://api.github.com/users/temuri416","html_url":"https://github.com/temuri416","followers_url":"https://api.github.com/users/temuri416/followers","following_url":"https://api.github.com/users/temuri416/following{/other_user}","gists_url":"https://api.github.com/users/temuri416/gists{/gist_id}","starred_url":"https://api.github.com/users/temuri416/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/temuri416/subscriptions","organizations_url":"https://api.github.com/users/temuri416/orgs","repos_url":"https://api.github.com/users/temuri416/repos","events_url":"https://api.github.com/users/temuri416/events{/privacy}","received_events_url":"https://api.github.com/users/temuri416/received_events","type":"User","site_admin":false},"repo":{"id":42402931,"name":"incubator","full_name":"temuri416/incubator","owner":{"login":"temuri416","id":3987203,"avatar_url":"https://avatars.githubusercontent.com/u/3987203?v=3","gravatar_id":"","url":"https://api.github.com/users/temuri416","html_url":"https://github.com/temuri416","followers_url":"https://api.github.com/users/temuri416/followers","following_url":"https://api.github.com/users/temuri416/following{/other_user}","gists_url":"https://api.github.com/users/temuri416/gists{/gist_id}","starred_url":"https://api.github.com/users/temuri416/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/temuri416/subscriptions","organizations_url":"https://api.github.com/users/temuri416/orgs","repos_url":"https://api.github.com/users/temuri416/repos","events_url":"https://api.github.com/users/temuri416/events{/privacy}","received_events_url":"https://api.github.com/users/temuri416/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/temuri416/incubator","description":"Incubator adapters/functionality for the Phalcon PHP Framework","fork":true,"url":"https://api.github.com/repos/temuri416/incubator","forks_url":"https://api.github.com/repos/temuri416/incubator/forks","keys_url":"https://api.github.com/repos/temuri416/incubator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/temuri416/incubator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/temuri416/incubator/teams","hooks_url":"https://api.github.com/repos/temuri416/incubator/hooks","issue_events_url":"https://api.github.com/repos/temuri416/incubator/issues/events{/number}","events_url":"https://api.github.com/repos/temuri416/incubator/events","assignees_url":"https://api.github.com/repos/temuri416/incubator/assignees{/user}","branches_url":"https://api.github.com/repos/temuri416/incubator/branches{/branch}","tags_url":"https://api.github.com/repos/temuri416/incubator/tags","blobs_url":"https://api.github.com/repos/temuri416/incubator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/temuri416/incubator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/temuri416/incubator/git/refs{/sha}","trees_url":"https://api.github.com/repos/temuri416/incubator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/temuri416/incubator/statuses/{sha}","languages_url":"https://api.github.com/repos/temuri416/incubator/languages","stargazers_url":"https://api.github.com/repos/temuri416/incubator/stargazers","contributors_url":"https://api.github.com/repos/temuri416/incubator/contributors","subscribers_url":"https://api.github.com/repos/temuri416/incubator/subscribers","subscription_url":"https://api.github.com/repos/temuri416/incubator/subscription","commits_url":"https://api.github.com/repos/temuri416/incubator/commits{/sha}","git_commits_url":"https://api.github.com/repos/temuri416/incubator/git/commits{/sha}","comments_url":"https://api.github.com/repos/temuri416/incubator/comments{/number}","issue_comment_url":"https://api.github.com/repos/temuri416/incubator/issues/comments{/number}","contents_url":"https://api.github.com/repos/temuri416/incubator/contents/{+path}","compare_url":"https://api.github.com/repos/temuri416/incubator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/temuri416/incubator/merges","archive_url":"https://api.github.com/repos/temuri416/incubator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/temuri416/incubator/downloads","issues_url":"https://api.github.com/repos/temuri416/incubator/issues{/number}","pulls_url":"https://api.github.com/repos/temuri416/incubator/pulls{/number}","milestones_url":"https://api.github.com/repos/temuri416/incubator/milestones{/number}","notifications_url":"https://api.github.com/repos/temuri416/incubator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/temuri416/incubator/labels{/name}","releases_url":"https://api.github.com/repos/temuri416/incubator/releases{/id}","created_at":"2015-09-13T16:15:41Z","updated_at":"2015-09-13T16:15:41Z","pushed_at":"2015-09-13T18:44:49Z","git_url":"git://github.com/temuri416/incubator.git","ssh_url":"git@github.com:temuri416/incubator.git","clone_url":"https://github.com/temuri416/incubator.git","svn_url":"https://github.com/temuri416/incubator","homepage":null,"size":3050,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"phalcon:2.0.x","ref":"2.0.x","sha":"d115b7f2ac00df65253e9509d5a1577e1d579855","user":{"login":"phalcon","id":1221505,"avatar_url":"https://avatars.githubusercontent.com/u/1221505?v=3","gravatar_id":"","url":"https://api.github.com/users/phalcon","html_url":"https://github.com/phalcon","followers_url":"https://api.github.com/users/phalcon/followers","following_url":"https://api.github.com/users/phalcon/following{/other_user}","gists_url":"https://api.github.com/users/phalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/phalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phalcon/subscriptions","organizations_url":"https://api.github.com/users/phalcon/orgs","repos_url":"https://api.github.com/users/phalcon/repos","events_url":"https://api.github.com/users/phalcon/events{/privacy}","received_events_url":"https://api.github.com/users/phalcon/received_events","type":"User","site_admin":false},"repo":{"id":6857360,"name":"incubator","full_name":"phalcon/incubator","owner":{"login":"phalcon","id":1221505,"avatar_url":"https://avatars.githubusercontent.com/u/1221505?v=3","gravatar_id":"","url":"https://api.github.com/users/phalcon","html_url":"https://github.com/phalcon","followers_url":"https://api.github.com/users/phalcon/followers","following_url":"https://api.github.com/users/phalcon/following{/other_user}","gists_url":"https://api.github.com/users/phalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/phalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phalcon/subscriptions","organizations_url":"https://api.github.com/users/phalcon/orgs","repos_url":"https://api.github.com/users/phalcon/repos","events_url":"https://api.github.com/users/phalcon/events{/privacy}","received_events_url":"https://api.github.com/users/phalcon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phalcon/incubator","description":"Incubator adapters/functionality for the Phalcon PHP Framework","fork":false,"url":"https://api.github.com/repos/phalcon/incubator","forks_url":"https://api.github.com/repos/phalcon/incubator/forks","keys_url":"https://api.github.com/repos/phalcon/incubator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phalcon/incubator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phalcon/incubator/teams","hooks_url":"https://api.github.com/repos/phalcon/incubator/hooks","issue_events_url":"https://api.github.com/repos/phalcon/incubator/issues/events{/number}","events_url":"https://api.github.com/repos/phalcon/incubator/events","assignees_url":"https://api.github.com/repos/phalcon/incubator/assignees{/user}","branches_url":"https://api.github.com/repos/phalcon/incubator/branches{/branch}","tags_url":"https://api.github.com/repos/phalcon/incubator/tags","blobs_url":"https://api.github.com/repos/phalcon/incubator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phalcon/incubator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phalcon/incubator/git/refs{/sha}","trees_url":"https://api.github.com/repos/phalcon/incubator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phalcon/incubator/statuses/{sha}","languages_url":"https://api.github.com/repos/phalcon/incubator/languages","stargazers_url":"https://api.github.com/repos/phalcon/incubator/stargazers","contributors_url":"https://api.github.com/repos/phalcon/incubator/contributors","subscribers_url":"https://api.github.com/repos/phalcon/incubator/subscribers","subscription_url":"https://api.github.com/repos/phalcon/incubator/subscription","commits_url":"https://api.github.com/repos/phalcon/incubator/commits{/sha}","git_commits_url":"https://api.github.com/repos/phalcon/incubator/git/commits{/sha}","comments_url":"https://api.github.com/repos/phalcon/incubator/comments{/number}","issue_comment_url":"https://api.github.com/repos/phalcon/incubator/issues/comments{/number}","contents_url":"https://api.github.com/repos/phalcon/incubator/contents/{+path}","compare_url":"https://api.github.com/repos/phalcon/incubator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phalcon/incubator/merges","archive_url":"https://api.github.com/repos/phalcon/incubator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phalcon/incubator/downloads","issues_url":"https://api.github.com/repos/phalcon/incubator/issues{/number}","pulls_url":"https://api.github.com/repos/phalcon/incubator/pulls{/number}","milestones_url":"https://api.github.com/repos/phalcon/incubator/milestones{/number}","notifications_url":"https://api.github.com/repos/phalcon/incubator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phalcon/incubator/labels{/name}","releases_url":"https://api.github.com/repos/phalcon/incubator/releases{/id}","created_at":"2012-11-25T23:45:51Z","updated_at":"2015-09-12T22:45:09Z","pushed_at":"2015-09-13T18:44:49Z","git_url":"git://github.com/phalcon/incubator.git","ssh_url":"git@github.com:phalcon/incubator.git","clone_url":"https://github.com/phalcon/incubator.git","svn_url":"https://github.com/phalcon/incubator","homepage":null,"size":3050,"stargazers_count":399,"watchers_count":399,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":233,"mirror_url":null,"open_issues_count":8,"forks":233,"open_issues":8,"watchers":399,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/phalcon/incubator/pulls/425"},"html":{"href":"https://github.com/phalcon/incubator/pull/425"},"issue":{"href":"https://api.github.com/repos/phalcon/incubator/issues/425"},"comments":{"href":"https://api.github.com/repos/phalcon/incubator/issues/425/comments"},"review_comments":{"href":"https://api.github.com/repos/phalcon/incubator/pulls/425/comments"},"review_comment":{"href":"https://api.github.com/repos/phalcon/incubator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phalcon/incubator/pulls/425/commits"},"statuses":{"href":"https://api.github.com/repos/phalcon/incubator/statuses/e7a383d9c15e3a1930e01f4fe99cfac00e394446"}}}}