{"action":"created","issue":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/1117","labels_url":"https://api.github.com/repos/phalcon/cphalcon/issues/1117/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/issues/1117/comments","events_url":"https://api.github.com/repos/phalcon/cphalcon/issues/1117/events","html_url":"https://github.com/phalcon/cphalcon/issues/1117","id":18249307,"number":1117,"title":"[NFR] Eager loading support of Phalcon\\Mvc\\Model","user":{"login":"hilyjiang","id":1214867,"avatar_url":"https://avatars.githubusercontent.com/u/1214867?v=3","gravatar_id":"","url":"https://api.github.com/users/hilyjiang","html_url":"https://github.com/hilyjiang","followers_url":"https://api.github.com/users/hilyjiang/followers","following_url":"https://api.github.com/users/hilyjiang/following{/other_user}","gists_url":"https://api.github.com/users/hilyjiang/gists{/gist_id}","starred_url":"https://api.github.com/users/hilyjiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hilyjiang/subscriptions","organizations_url":"https://api.github.com/users/hilyjiang/orgs","repos_url":"https://api.github.com/users/hilyjiang/repos","events_url":"https://api.github.com/users/hilyjiang/events{/privacy}","received_events_url":"https://api.github.com/users/hilyjiang/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phalcon/cphalcon/labels/New%20Feature%20Request","name":"New Feature Request","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":40,"created_at":"2013-08-19T16:30:31Z","updated_at":"2015-05-29T19:25:45Z","closed_at":null,"body":"Once we use model, we always define relationships between models.\r\n\r\nIn most cases, we need to implement a list view, displaying objects with its foreign key field's value.\r\n\r\nThis will cause a N+1 selects problem (http://use-the-index-luke.com/sql/join/nested-loops-join-n1-problem), slowing down the performance.\r\n\r\nSo I think it is necessary to implement the eager loading feature of Phalcon\\Mvc\\Model.\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1669740-nfr-eager-loading-support-of-phalcon-mvc-model?utm_campaign=plugin&utm_content=tracker%2F50707&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F50707&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/comments/106908645","html_url":"https://github.com/phalcon/cphalcon/issues/1117#issuecomment-106908645","issue_url":"https://api.github.com/repos/phalcon/cphalcon/issues/1117","id":106908645,"user":{"login":"stibiumz","id":5264529,"avatar_url":"https://avatars.githubusercontent.com/u/5264529?v=3","gravatar_id":"","url":"https://api.github.com/users/stibiumz","html_url":"https://github.com/stibiumz","followers_url":"https://api.github.com/users/stibiumz/followers","following_url":"https://api.github.com/users/stibiumz/following{/other_user}","gists_url":"https://api.github.com/users/stibiumz/gists{/gist_id}","starred_url":"https://api.github.com/users/stibiumz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stibiumz/subscriptions","organizations_url":"https://api.github.com/users/stibiumz/orgs","repos_url":"https://api.github.com/users/stibiumz/repos","events_url":"https://api.github.com/users/stibiumz/events{/privacy}","received_events_url":"https://api.github.com/users/stibiumz/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T19:25:45Z","updated_at":"2015-05-29T19:25:45Z","body":"@ErickSkrauch PHP 7 is coming, PHP 5.6 was released about a year ago, furthermore if you can install Phalcon, also PHP 5.6... Things should be keep up to date when possible.\r\n\r\n@sszdh , @sergeyklay I want to keep the namespace in it, as is part of my framework and I feel more comfortable with it, anyways would be possible to maintain the code in the two repositories, what do you think?"}}