{"action":"created","comment":{"url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/comments/35858458","id":35858458,"diff_hunk":"@@ -83,6 +84,15 @@ function()\n \t\t\t}\n \t\t);\n \n+\t\t// Relation\n+\t\t$container->share(\n+\t\t\t'relation.container',\n+\t\t\tfunction(Container $container)","path":"src/Provider/SystemProvider.php","position":15,"original_position":15,"commit_id":"622199ce81ac1307e9d142f657724aec8e8eb828","original_commit_id":"622199ce81ac1307e9d142f657724aec8e8eb828","user":{"login":"LeoOnTheEarth","id":726108,"avatar_url":"https://avatars.githubusercontent.com/u/726108?v=3","gravatar_id":"","url":"https://api.github.com/users/LeoOnTheEarth","html_url":"https://github.com/LeoOnTheEarth","followers_url":"https://api.github.com/users/LeoOnTheEarth/followers","following_url":"https://api.github.com/users/LeoOnTheEarth/following{/other_user}","gists_url":"https://api.github.com/users/LeoOnTheEarth/gists{/gist_id}","starred_url":"https://api.github.com/users/LeoOnTheEarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeoOnTheEarth/subscriptions","organizations_url":"https://api.github.com/users/LeoOnTheEarth/orgs","repos_url":"https://api.github.com/users/LeoOnTheEarth/repos","events_url":"https://api.github.com/users/LeoOnTheEarth/events{/privacy}","received_events_url":"https://api.github.com/users/LeoOnTheEarth/received_events","type":"User","site_admin":false},"body":"`$container` 參數有要用到嗎?","created_at":"2015-07-30T10:41:37Z","updated_at":"2015-07-30T10:41:37Z","html_url":"https://github.com/smstw/windwalker-joomla-rad/pull/100#discussion_r35858458","pull_request_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/100","_links":{"self":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/comments/35858458"},"html":{"href":"https://github.com/smstw/windwalker-joomla-rad/pull/100#discussion_r35858458"},"pull_request":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/100"}}},"pull_request":{"url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/100","id":40321633,"html_url":"https://github.com/smstw/windwalker-joomla-rad/pull/100","diff_url":"https://github.com/smstw/windwalker-joomla-rad/pull/100.diff","patch_url":"https://github.com/smstw/windwalker-joomla-rad/pull/100.patch","issue_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/issues/100","number":100,"state":"open","locked":false,"title":"[Feature] Simple ORM","user":{"login":"asika32764","id":1639206,"avatar_url":"https://avatars.githubusercontent.com/u/1639206?v=3","gravatar_id":"","url":"https://api.github.com/users/asika32764","html_url":"https://github.com/asika32764","followers_url":"https://api.github.com/users/asika32764/followers","following_url":"https://api.github.com/users/asika32764/following{/other_user}","gists_url":"https://api.github.com/users/asika32764/gists{/gist_id}","starred_url":"https://api.github.com/users/asika32764/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asika32764/subscriptions","organizations_url":"https://api.github.com/users/asika32764/orgs","repos_url":"https://api.github.com/users/asika32764/repos","events_url":"https://api.github.com/users/asika32764/events{/privacy}","received_events_url":"https://api.github.com/users/asika32764/received_events","type":"User","site_admin":false},"body":"工作狀態，等完成再寫文件. Ref to https://github.com/smstw/windwalker-joomla-rad/issues/75\r\n\r\n- [x] OneToMany\r\n- [x] OneToOne\r\n- [x] ManyToOne\r\n- [x] ManyToMany\r\n- [x] Table Observer\r\n- [x] DataMapper Observer\r\n\r\n## ORM 文件\r\n\r\n先看這邊，了解怎麼使用，才知道這個包在幹嘛\r\nhttps://gist.github.com/asika32764/bb7d04d3041c445b6d97\r\n\r\n## Review 導覽\r\n\r\n這個包除了 Relation 以外，有新增幾個周邊 Helper 幫助 Database 存取。由於這對後續的工作有幫助，需要優先 review 並 merge\r\n\r\n### Database\r\n\r\n新增一個 `DatabaseHelper` 可以方便進行 DB 操作\r\nhttps://github.com/asika32764/windwalker-joomla-rad/blob/feature-table-relation/src/Helper/DatabaseHelper.php\r\n\r\n新增 `AbstractDatabaseTestCase` 方便未來做資料庫相關的測試，`fixtures` 裡面的資料都預先做好關聯了\r\nhttps://github.com/asika32764/windwalker-joomla-rad/tree/feature-table-relation/test/Database\r\n\r\n### DataMapper\r\n\r\n新增 `DataMapperFacade` 方便快速使用 DataMapper\r\n新增 `DataMapperContainer` 可以快取 DataMapper\r\n\r\nhttps://github.com/asika32764/windwalker-joomla-rad/tree/feature-table-relation/src/DataMapper\r\n\r\n新增 `ObservableDataMapper` ，未來繼承這個 DataMapper 就能使用 Observer 與 Relation\r\nhttps://github.com/asika32764/windwalker-joomla-rad/blob/feature-table-relation/src/DataMapper/AbstractObservableDataMapper.php\r\n\r\n### Relation\r\n\r\n用來實作 ORM 的處理器\r\n\r\nhttps://github.com/asika32764/windwalker-joomla-rad/tree/feature-table-relation/src/Relation\r\n\r\n### Observers\r\n\r\nDataMapper 與 Table 都各有一個 `RelationObserver` 來實際執行關聯操作\r\nhttps://github.com/asika32764/windwalker-joomla-rad/tree/feature-table-relation/src/Relation/Observer\r\nhttps://github.com/asika32764/windwalker-joomla-rad/tree/feature-table-relation/src/DataMapper/Observer\r\n\r\n","created_at":"2015-07-20T03:30:26Z","updated_at":"2015-07-30T10:41:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64c160eebeb0b69cb43be709d85b6e3bd3b3f48d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/100/commits","review_comments_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/100/comments","review_comment_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/comments{/number}","comments_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/issues/100/comments","statuses_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/statuses/622199ce81ac1307e9d142f657724aec8e8eb828","head":{"label":"asika32764:feature-table-relation","ref":"feature-table-relation","sha":"622199ce81ac1307e9d142f657724aec8e8eb828","user":{"login":"asika32764","id":1639206,"avatar_url":"https://avatars.githubusercontent.com/u/1639206?v=3","gravatar_id":"","url":"https://api.github.com/users/asika32764","html_url":"https://github.com/asika32764","followers_url":"https://api.github.com/users/asika32764/followers","following_url":"https://api.github.com/users/asika32764/following{/other_user}","gists_url":"https://api.github.com/users/asika32764/gists{/gist_id}","starred_url":"https://api.github.com/users/asika32764/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asika32764/subscriptions","organizations_url":"https://api.github.com/users/asika32764/orgs","repos_url":"https://api.github.com/users/asika32764/repos","events_url":"https://api.github.com/users/asika32764/events{/privacy}","received_events_url":"https://api.github.com/users/asika32764/received_events","type":"User","site_admin":false},"repo":{"id":27250984,"name":"windwalker-joomla-rad","full_name":"asika32764/windwalker-joomla-rad","owner":{"login":"asika32764","id":1639206,"avatar_url":"https://avatars.githubusercontent.com/u/1639206?v=3","gravatar_id":"","url":"https://api.github.com/users/asika32764","html_url":"https://github.com/asika32764","followers_url":"https://api.github.com/users/asika32764/followers","following_url":"https://api.github.com/users/asika32764/following{/other_user}","gists_url":"https://api.github.com/users/asika32764/gists{/gist_id}","starred_url":"https://api.github.com/users/asika32764/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asika32764/subscriptions","organizations_url":"https://api.github.com/users/asika32764/orgs","repos_url":"https://api.github.com/users/asika32764/repos","events_url":"https://api.github.com/users/asika32764/events{/privacy}","received_events_url":"https://api.github.com/users/asika32764/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/asika32764/windwalker-joomla-rad","description":"Windwalker RAD framework for Joomla CMS","fork":true,"url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad","forks_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/forks","keys_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/teams","hooks_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/hooks","issue_events_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/issues/events{/number}","events_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/events","assignees_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/assignees{/user}","branches_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/branches{/branch}","tags_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/tags","blobs_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/git/refs{/sha}","trees_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/statuses/{sha}","languages_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/languages","stargazers_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/stargazers","contributors_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/contributors","subscribers_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/subscribers","subscription_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/subscription","commits_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/commits{/sha}","git_commits_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/git/commits{/sha}","comments_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/comments{/number}","issue_comment_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/issues/comments{/number}","contents_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/contents/{+path}","compare_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/merges","archive_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/downloads","issues_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/issues{/number}","pulls_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/pulls{/number}","milestones_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/milestones{/number}","notifications_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/labels{/name}","releases_url":"https://api.github.com/repos/asika32764/windwalker-joomla-rad/releases{/id}","created_at":"2014-11-28T03:58:52Z","updated_at":"2015-03-13T07:30:04Z","pushed_at":"2015-07-30T06:05:18Z","git_url":"git://github.com/asika32764/windwalker-joomla-rad.git","ssh_url":"git@github.com:asika32764/windwalker-joomla-rad.git","clone_url":"https://github.com/asika32764/windwalker-joomla-rad.git","svn_url":"https://github.com/asika32764/windwalker-joomla-rad","homepage":"http://ventoviro.github.io/windwalker-rad-doc/","size":2886,"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":"staging"}},"base":{"label":"smstw:dev-2.1","ref":"dev-2.1","sha":"c224d65254adbbe5f5225f992ec7a897f16b709e","user":{"login":"smstw","id":5608018,"avatar_url":"https://avatars.githubusercontent.com/u/5608018?v=3","gravatar_id":"","url":"https://api.github.com/users/smstw","html_url":"https://github.com/smstw","followers_url":"https://api.github.com/users/smstw/followers","following_url":"https://api.github.com/users/smstw/following{/other_user}","gists_url":"https://api.github.com/users/smstw/gists{/gist_id}","starred_url":"https://api.github.com/users/smstw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smstw/subscriptions","organizations_url":"https://api.github.com/users/smstw/orgs","repos_url":"https://api.github.com/users/smstw/repos","events_url":"https://api.github.com/users/smstw/events{/privacy}","received_events_url":"https://api.github.com/users/smstw/received_events","type":"Organization","site_admin":false},"repo":{"id":24495433,"name":"windwalker-joomla-rad","full_name":"smstw/windwalker-joomla-rad","owner":{"login":"smstw","id":5608018,"avatar_url":"https://avatars.githubusercontent.com/u/5608018?v=3","gravatar_id":"","url":"https://api.github.com/users/smstw","html_url":"https://github.com/smstw","followers_url":"https://api.github.com/users/smstw/followers","following_url":"https://api.github.com/users/smstw/following{/other_user}","gists_url":"https://api.github.com/users/smstw/gists{/gist_id}","starred_url":"https://api.github.com/users/smstw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smstw/subscriptions","organizations_url":"https://api.github.com/users/smstw/orgs","repos_url":"https://api.github.com/users/smstw/repos","events_url":"https://api.github.com/users/smstw/events{/privacy}","received_events_url":"https://api.github.com/users/smstw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/smstw/windwalker-joomla-rad","description":"Windwalker RAD framework for Joomla CMS","fork":true,"url":"https://api.github.com/repos/smstw/windwalker-joomla-rad","forks_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/forks","keys_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/teams","hooks_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/hooks","issue_events_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/issues/events{/number}","events_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/events","assignees_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/assignees{/user}","branches_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/branches{/branch}","tags_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/tags","blobs_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/git/refs{/sha}","trees_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/statuses/{sha}","languages_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/languages","stargazers_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/stargazers","contributors_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/contributors","subscribers_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/subscribers","subscription_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/subscription","commits_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/commits{/sha}","git_commits_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/git/commits{/sha}","comments_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/comments{/number}","issue_comment_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/issues/comments{/number}","contents_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/contents/{+path}","compare_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/merges","archive_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/downloads","issues_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/issues{/number}","pulls_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls{/number}","milestones_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/milestones{/number}","notifications_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/labels{/name}","releases_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/releases{/id}","created_at":"2014-09-26T10:20:58Z","updated_at":"2015-06-16T14:22:35Z","pushed_at":"2015-07-30T06:05:18Z","git_url":"git://github.com/smstw/windwalker-joomla-rad.git","ssh_url":"git@github.com:smstw/windwalker-joomla-rad.git","clone_url":"https://github.com/smstw/windwalker-joomla-rad.git","svn_url":"https://github.com/smstw/windwalker-joomla-rad","homepage":"http://ventoviro.github.io/windwalker-rad-doc/","size":3396,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":58,"forks":3,"open_issues":58,"watchers":1,"default_branch":"dev-2.1"}},"_links":{"self":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/100"},"html":{"href":"https://github.com/smstw/windwalker-joomla-rad/pull/100"},"issue":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/issues/100"},"comments":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/issues/100/comments"},"review_comments":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/100/comments"},"review_comment":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/100/commits"},"statuses":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/statuses/622199ce81ac1307e9d142f657724aec8e8eb828"}}}}