{"action":"closed","number":90,"pull_request":{"url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/pulls/90","id":52391408,"html_url":"https://github.com/avenirer/CodeIgniter-MY_Model/pull/90","diff_url":"https://github.com/avenirer/CodeIgniter-MY_Model/pull/90.diff","patch_url":"https://github.com/avenirer/CodeIgniter-MY_Model/pull/90.patch","issue_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/issues/90","number":90,"state":"closed","locked":false,"title":"Not getting data with have_pivot_many","user":{"login":"kidino","id":1450433,"avatar_url":"https://avatars.githubusercontent.com/u/1450433?v=3","gravatar_id":"","url":"https://api.github.com/users/kidino","html_url":"https://github.com/kidino","followers_url":"https://api.github.com/users/kidino/followers","following_url":"https://api.github.com/users/kidino/following{/other_user}","gists_url":"https://api.github.com/users/kidino/gists{/gist_id}","starred_url":"https://api.github.com/users/kidino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kidino/subscriptions","organizations_url":"https://api.github.com/users/kidino/orgs","repos_url":"https://api.github.com/users/kidino/repos","events_url":"https://api.github.com/users/kidino/events{/privacy}","received_events_url":"https://api.github.com/users/kidino/received_events","type":"User","site_admin":false},"body":"I define my have_pivot_many like the below. And I can only make it work when I comment out the singular($this->table) at like 1152\r\n\r\nclass Project_model extends MY_Model\r\n{\r\n\tpublic function __construct()\r\n\t{\r\n        $this->table = 'projects';\r\n        $this->primary_key = 'project_id';\r\n                        \r\n        $this->has_many_pivot['users'] = array(\r\n                    'foreign_model'=>'User_model',\r\n                    'pivot_table'=>'projects_users',\r\n                    'local_key'=>'project_id',\r\n                    'pivot_local_key'=>'project_id', \r\n                    'pivot_foreign_key'=>'user_id',\r\n                    'foreign_key'=>'id',\r\n                    'get_relate'=>FALSE /* another optional setting, which is explained below */\r\n                );\r\n\t\tparent::__construct();\r\n\t}\r\n}","created_at":"2015-12-02T12:50:18Z","updated_at":"2015-12-02T14:02:14Z","closed_at":"2015-12-02T14:02:14Z","merged_at":null,"merge_commit_sha":"b7dce1fd1f4060375d6298f4093af8592dfaf300","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/pulls/90/commits","review_comments_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/pulls/90/comments","review_comment_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/pulls/comments{/number}","comments_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/issues/90/comments","statuses_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/statuses/5f2cb939545dfae0527bb914beac0dd056dc444b","head":{"label":"kidino:version-3.0","ref":"version-3.0","sha":"5f2cb939545dfae0527bb914beac0dd056dc444b","user":{"login":"kidino","id":1450433,"avatar_url":"https://avatars.githubusercontent.com/u/1450433?v=3","gravatar_id":"","url":"https://api.github.com/users/kidino","html_url":"https://github.com/kidino","followers_url":"https://api.github.com/users/kidino/followers","following_url":"https://api.github.com/users/kidino/following{/other_user}","gists_url":"https://api.github.com/users/kidino/gists{/gist_id}","starred_url":"https://api.github.com/users/kidino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kidino/subscriptions","organizations_url":"https://api.github.com/users/kidino/orgs","repos_url":"https://api.github.com/users/kidino/repos","events_url":"https://api.github.com/users/kidino/events{/privacy}","received_events_url":"https://api.github.com/users/kidino/received_events","type":"User","site_admin":false},"repo":{"id":47260294,"name":"CodeIgniter-MY_Model","full_name":"kidino/CodeIgniter-MY_Model","owner":{"login":"kidino","id":1450433,"avatar_url":"https://avatars.githubusercontent.com/u/1450433?v=3","gravatar_id":"","url":"https://api.github.com/users/kidino","html_url":"https://github.com/kidino","followers_url":"https://api.github.com/users/kidino/followers","following_url":"https://api.github.com/users/kidino/following{/other_user}","gists_url":"https://api.github.com/users/kidino/gists{/gist_id}","starred_url":"https://api.github.com/users/kidino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kidino/subscriptions","organizations_url":"https://api.github.com/users/kidino/orgs","repos_url":"https://api.github.com/users/kidino/repos","events_url":"https://api.github.com/users/kidino/events{/privacy}","received_events_url":"https://api.github.com/users/kidino/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kidino/CodeIgniter-MY_Model","description":"","fork":true,"url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model","forks_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/forks","keys_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/teams","hooks_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/hooks","issue_events_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/issues/events{/number}","events_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/events","assignees_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/assignees{/user}","branches_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/branches{/branch}","tags_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/tags","blobs_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/git/refs{/sha}","trees_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/statuses/{sha}","languages_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/languages","stargazers_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/stargazers","contributors_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/contributors","subscribers_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/subscribers","subscription_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/subscription","commits_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/commits{/sha}","git_commits_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/git/commits{/sha}","comments_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/comments{/number}","issue_comment_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/issues/comments{/number}","contents_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/contents/{+path}","compare_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/merges","archive_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/downloads","issues_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/issues{/number}","pulls_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/pulls{/number}","milestones_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/milestones{/number}","notifications_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/labels{/name}","releases_url":"https://api.github.com/repos/kidino/CodeIgniter-MY_Model/releases{/id}","created_at":"2015-12-02T12:45:44Z","updated_at":"2015-12-02T12:45:45Z","pushed_at":"2015-12-02T13:19:25Z","git_url":"git://github.com/kidino/CodeIgniter-MY_Model.git","ssh_url":"git@github.com:kidino/CodeIgniter-MY_Model.git","clone_url":"https://github.com/kidino/CodeIgniter-MY_Model.git","svn_url":"https://github.com/kidino/CodeIgniter-MY_Model","homepage":null,"size":256,"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":"version-3.0"}},"base":{"label":"avenirer:version-3.0","ref":"version-3.0","sha":"f037d491c4f617a2967bc7606838250097805c35","user":{"login":"avenirer","id":3034772,"avatar_url":"https://avatars.githubusercontent.com/u/3034772?v=3","gravatar_id":"","url":"https://api.github.com/users/avenirer","html_url":"https://github.com/avenirer","followers_url":"https://api.github.com/users/avenirer/followers","following_url":"https://api.github.com/users/avenirer/following{/other_user}","gists_url":"https://api.github.com/users/avenirer/gists{/gist_id}","starred_url":"https://api.github.com/users/avenirer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avenirer/subscriptions","organizations_url":"https://api.github.com/users/avenirer/orgs","repos_url":"https://api.github.com/users/avenirer/repos","events_url":"https://api.github.com/users/avenirer/events{/privacy}","received_events_url":"https://api.github.com/users/avenirer/received_events","type":"User","site_admin":false},"repo":{"id":19141615,"name":"CodeIgniter-MY_Model","full_name":"avenirer/CodeIgniter-MY_Model","owner":{"login":"avenirer","id":3034772,"avatar_url":"https://avatars.githubusercontent.com/u/3034772?v=3","gravatar_id":"","url":"https://api.github.com/users/avenirer","html_url":"https://github.com/avenirer","followers_url":"https://api.github.com/users/avenirer/followers","following_url":"https://api.github.com/users/avenirer/following{/other_user}","gists_url":"https://api.github.com/users/avenirer/gists{/gist_id}","starred_url":"https://api.github.com/users/avenirer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avenirer/subscriptions","organizations_url":"https://api.github.com/users/avenirer/orgs","repos_url":"https://api.github.com/users/avenirer/repos","events_url":"https://api.github.com/users/avenirer/events{/privacy}","received_events_url":"https://api.github.com/users/avenirer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/avenirer/CodeIgniter-MY_Model","description":"","fork":false,"url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model","forks_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/forks","keys_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/keys{/key_id}","collaborators_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/teams","hooks_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/hooks","issue_events_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/issues/events{/number}","events_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/events","assignees_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/assignees{/user}","branches_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/branches{/branch}","tags_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/tags","blobs_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/git/refs{/sha}","trees_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/git/trees{/sha}","statuses_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/statuses/{sha}","languages_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/languages","stargazers_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/stargazers","contributors_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/contributors","subscribers_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/subscribers","subscription_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/subscription","commits_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/commits{/sha}","git_commits_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/git/commits{/sha}","comments_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/comments{/number}","issue_comment_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/issues/comments{/number}","contents_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/contents/{+path}","compare_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/compare/{base}...{head}","merges_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/merges","archive_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/downloads","issues_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/issues{/number}","pulls_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/pulls{/number}","milestones_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/milestones{/number}","notifications_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/labels{/name}","releases_url":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/releases{/id}","created_at":"2014-04-25T09:52:45Z","updated_at":"2015-12-02T06:31:06Z","pushed_at":"2015-12-02T13:19:25Z","git_url":"git://github.com/avenirer/CodeIgniter-MY_Model.git","ssh_url":"git@github.com:avenirer/CodeIgniter-MY_Model.git","clone_url":"https://github.com/avenirer/CodeIgniter-MY_Model.git","svn_url":"https://github.com/avenirer/CodeIgniter-MY_Model","homepage":null,"size":367,"stargazers_count":58,"watchers_count":58,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":10,"forks":42,"open_issues":10,"watchers":58,"default_branch":"version-3.0"}},"_links":{"self":{"href":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/pulls/90"},"html":{"href":"https://github.com/avenirer/CodeIgniter-MY_Model/pull/90"},"issue":{"href":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/issues/90"},"comments":{"href":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/issues/90/comments"},"review_comments":{"href":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/pulls/90/comments"},"review_comment":{"href":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/pulls/90/commits"},"statuses":{"href":"https://api.github.com/repos/avenirer/CodeIgniter-MY_Model/statuses/5f2cb939545dfae0527bb914beac0dd056dc444b"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":4,"review_comments":0,"commits":2,"additions":15,"deletions":1,"changed_files":1}}