{"action":"opened","number":4773,"pull_request":{"url":"https://api.github.com/repos/bolt/bolt/pulls/4773","id":57737767,"html_url":"https://github.com/bolt/bolt/pull/4773","diff_url":"https://github.com/bolt/bolt/pull/4773.diff","patch_url":"https://github.com/bolt/bolt/pull/4773.patch","issue_url":"https://api.github.com/repos/bolt/bolt/issues/4773","number":4773,"state":"open","locked":false,"title":"Fix Handling of Bi-directional relations","user":{"login":"rossriley","id":5082,"avatar_url":"https://avatars.githubusercontent.com/u/5082?v=3","gravatar_id":"","url":"https://api.github.com/users/rossriley","html_url":"https://github.com/rossriley","followers_url":"https://api.github.com/users/rossriley/followers","following_url":"https://api.github.com/users/rossriley/following{/other_user}","gists_url":"https://api.github.com/users/rossriley/gists{/gist_id}","starred_url":"https://api.github.com/users/rossriley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossriley/subscriptions","organizations_url":"https://api.github.com/users/rossriley/orgs","repos_url":"https://api.github.com/users/rossriley/repos","events_url":"https://api.github.com/users/rossriley/events{/privacy}","received_events_url":"https://api.github.com/users/rossriley/received_events","type":"User","site_admin":false},"body":"This takes care of maintaining backwards compatibility with Bi-directional related records. For example where pages is related to entries and entries related to pages. \r\n\r\nThe current behaviour operates on a first-come first-saved system for determining the direction of the relation and once saved there's no distinction between a page that's related to an entry, or an entry related to a page.\r\n\r\nThis PR attempts to replicate this, whilst leaving open the ability to deprecate in future when we are ready to move to uni-directional relations.","created_at":"2016-01-30T11:37:09Z","updated_at":"2016-01-30T11:37:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bolt/bolt/pulls/4773/commits","review_comments_url":"https://api.github.com/repos/bolt/bolt/pulls/4773/comments","review_comment_url":"https://api.github.com/repos/bolt/bolt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bolt/bolt/issues/4773/comments","statuses_url":"https://api.github.com/repos/bolt/bolt/statuses/60a4d8ecde6eeba14b9eaf5a04d563bbee9c451d","head":{"label":"rossriley:fix/merge-incoming-relations","ref":"fix/merge-incoming-relations","sha":"60a4d8ecde6eeba14b9eaf5a04d563bbee9c451d","user":{"login":"rossriley","id":5082,"avatar_url":"https://avatars.githubusercontent.com/u/5082?v=3","gravatar_id":"","url":"https://api.github.com/users/rossriley","html_url":"https://github.com/rossriley","followers_url":"https://api.github.com/users/rossriley/followers","following_url":"https://api.github.com/users/rossriley/following{/other_user}","gists_url":"https://api.github.com/users/rossriley/gists{/gist_id}","starred_url":"https://api.github.com/users/rossriley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossriley/subscriptions","organizations_url":"https://api.github.com/users/rossriley/orgs","repos_url":"https://api.github.com/users/rossriley/repos","events_url":"https://api.github.com/users/rossriley/events{/privacy}","received_events_url":"https://api.github.com/users/rossriley/received_events","type":"User","site_admin":false},"repo":{"id":19492823,"name":"bolt","full_name":"rossriley/bolt","owner":{"login":"rossriley","id":5082,"avatar_url":"https://avatars.githubusercontent.com/u/5082?v=3","gravatar_id":"","url":"https://api.github.com/users/rossriley","html_url":"https://github.com/rossriley","followers_url":"https://api.github.com/users/rossriley/followers","following_url":"https://api.github.com/users/rossriley/following{/other_user}","gists_url":"https://api.github.com/users/rossriley/gists{/gist_id}","starred_url":"https://api.github.com/users/rossriley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossriley/subscriptions","organizations_url":"https://api.github.com/users/rossriley/orgs","repos_url":"https://api.github.com/users/rossriley/repos","events_url":"https://api.github.com/users/rossriley/events{/privacy}","received_events_url":"https://api.github.com/users/rossriley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rossriley/bolt","description":"Bolt is a simple CMS written in PHP. It is based on Silex and Symfony components, uses Twig and either SQLite, MySQL or PostgreSQL.","fork":true,"url":"https://api.github.com/repos/rossriley/bolt","forks_url":"https://api.github.com/repos/rossriley/bolt/forks","keys_url":"https://api.github.com/repos/rossriley/bolt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rossriley/bolt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rossriley/bolt/teams","hooks_url":"https://api.github.com/repos/rossriley/bolt/hooks","issue_events_url":"https://api.github.com/repos/rossriley/bolt/issues/events{/number}","events_url":"https://api.github.com/repos/rossriley/bolt/events","assignees_url":"https://api.github.com/repos/rossriley/bolt/assignees{/user}","branches_url":"https://api.github.com/repos/rossriley/bolt/branches{/branch}","tags_url":"https://api.github.com/repos/rossriley/bolt/tags","blobs_url":"https://api.github.com/repos/rossriley/bolt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rossriley/bolt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rossriley/bolt/git/refs{/sha}","trees_url":"https://api.github.com/repos/rossriley/bolt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rossriley/bolt/statuses/{sha}","languages_url":"https://api.github.com/repos/rossriley/bolt/languages","stargazers_url":"https://api.github.com/repos/rossriley/bolt/stargazers","contributors_url":"https://api.github.com/repos/rossriley/bolt/contributors","subscribers_url":"https://api.github.com/repos/rossriley/bolt/subscribers","subscription_url":"https://api.github.com/repos/rossriley/bolt/subscription","commits_url":"https://api.github.com/repos/rossriley/bolt/commits{/sha}","git_commits_url":"https://api.github.com/repos/rossriley/bolt/git/commits{/sha}","comments_url":"https://api.github.com/repos/rossriley/bolt/comments{/number}","issue_comment_url":"https://api.github.com/repos/rossriley/bolt/issues/comments{/number}","contents_url":"https://api.github.com/repos/rossriley/bolt/contents/{+path}","compare_url":"https://api.github.com/repos/rossriley/bolt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rossriley/bolt/merges","archive_url":"https://api.github.com/repos/rossriley/bolt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rossriley/bolt/downloads","issues_url":"https://api.github.com/repos/rossriley/bolt/issues{/number}","pulls_url":"https://api.github.com/repos/rossriley/bolt/pulls{/number}","milestones_url":"https://api.github.com/repos/rossriley/bolt/milestones{/number}","notifications_url":"https://api.github.com/repos/rossriley/bolt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rossriley/bolt/labels{/name}","releases_url":"https://api.github.com/repos/rossriley/bolt/releases{/id}","deployments_url":"https://api.github.com/repos/rossriley/bolt/deployments","created_at":"2014-05-06T12:12:06Z","updated_at":"2016-01-28T09:32:21Z","pushed_at":"2016-01-30T11:31:18Z","git_url":"git://github.com/rossriley/bolt.git","ssh_url":"git@github.com:rossriley/bolt.git","clone_url":"https://github.com/rossriley/bolt.git","svn_url":"https://github.com/rossriley/bolt","homepage":"","size":54128,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"bolt:master","ref":"master","sha":"2e70f46aab79a42db81aeed9bef93c3ba34a6fc7","user":{"login":"bolt","id":3869752,"avatar_url":"https://avatars.githubusercontent.com/u/3869752?v=3","gravatar_id":"","url":"https://api.github.com/users/bolt","html_url":"https://github.com/bolt","followers_url":"https://api.github.com/users/bolt/followers","following_url":"https://api.github.com/users/bolt/following{/other_user}","gists_url":"https://api.github.com/users/bolt/gists{/gist_id}","starred_url":"https://api.github.com/users/bolt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bolt/subscriptions","organizations_url":"https://api.github.com/users/bolt/orgs","repos_url":"https://api.github.com/users/bolt/repos","events_url":"https://api.github.com/users/bolt/events{/privacy}","received_events_url":"https://api.github.com/users/bolt/received_events","type":"Organization","site_admin":false},"repo":{"id":4665416,"name":"bolt","full_name":"bolt/bolt","owner":{"login":"bolt","id":3869752,"avatar_url":"https://avatars.githubusercontent.com/u/3869752?v=3","gravatar_id":"","url":"https://api.github.com/users/bolt","html_url":"https://github.com/bolt","followers_url":"https://api.github.com/users/bolt/followers","following_url":"https://api.github.com/users/bolt/following{/other_user}","gists_url":"https://api.github.com/users/bolt/gists{/gist_id}","starred_url":"https://api.github.com/users/bolt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bolt/subscriptions","organizations_url":"https://api.github.com/users/bolt/orgs","repos_url":"https://api.github.com/users/bolt/repos","events_url":"https://api.github.com/users/bolt/events{/privacy}","received_events_url":"https://api.github.com/users/bolt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bolt/bolt","description":"Bolt is a simple CMS written in PHP. It is based on Silex and Symfony components, uses Twig and either SQLite, MySQL or PostgreSQL.","fork":false,"url":"https://api.github.com/repos/bolt/bolt","forks_url":"https://api.github.com/repos/bolt/bolt/forks","keys_url":"https://api.github.com/repos/bolt/bolt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bolt/bolt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bolt/bolt/teams","hooks_url":"https://api.github.com/repos/bolt/bolt/hooks","issue_events_url":"https://api.github.com/repos/bolt/bolt/issues/events{/number}","events_url":"https://api.github.com/repos/bolt/bolt/events","assignees_url":"https://api.github.com/repos/bolt/bolt/assignees{/user}","branches_url":"https://api.github.com/repos/bolt/bolt/branches{/branch}","tags_url":"https://api.github.com/repos/bolt/bolt/tags","blobs_url":"https://api.github.com/repos/bolt/bolt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bolt/bolt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bolt/bolt/git/refs{/sha}","trees_url":"https://api.github.com/repos/bolt/bolt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bolt/bolt/statuses/{sha}","languages_url":"https://api.github.com/repos/bolt/bolt/languages","stargazers_url":"https://api.github.com/repos/bolt/bolt/stargazers","contributors_url":"https://api.github.com/repos/bolt/bolt/contributors","subscribers_url":"https://api.github.com/repos/bolt/bolt/subscribers","subscription_url":"https://api.github.com/repos/bolt/bolt/subscription","commits_url":"https://api.github.com/repos/bolt/bolt/commits{/sha}","git_commits_url":"https://api.github.com/repos/bolt/bolt/git/commits{/sha}","comments_url":"https://api.github.com/repos/bolt/bolt/comments{/number}","issue_comment_url":"https://api.github.com/repos/bolt/bolt/issues/comments{/number}","contents_url":"https://api.github.com/repos/bolt/bolt/contents/{+path}","compare_url":"https://api.github.com/repos/bolt/bolt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bolt/bolt/merges","archive_url":"https://api.github.com/repos/bolt/bolt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bolt/bolt/downloads","issues_url":"https://api.github.com/repos/bolt/bolt/issues{/number}","pulls_url":"https://api.github.com/repos/bolt/bolt/pulls{/number}","milestones_url":"https://api.github.com/repos/bolt/bolt/milestones{/number}","notifications_url":"https://api.github.com/repos/bolt/bolt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bolt/bolt/labels{/name}","releases_url":"https://api.github.com/repos/bolt/bolt/releases{/id}","deployments_url":"https://api.github.com/repos/bolt/bolt/deployments","created_at":"2012-06-14T16:07:54Z","updated_at":"2016-01-30T09:52:49Z","pushed_at":"2016-01-30T07:25:03Z","git_url":"git://github.com/bolt/bolt.git","ssh_url":"git@github.com:bolt/bolt.git","clone_url":"https://github.com/bolt/bolt.git","svn_url":"https://github.com/bolt/bolt","homepage":"","size":59361,"stargazers_count":2556,"watchers_count":2556,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":590,"mirror_url":null,"open_issues_count":131,"forks":590,"open_issues":131,"watchers":2556,"default_branch":"release/2.2"}},"_links":{"self":{"href":"https://api.github.com/repos/bolt/bolt/pulls/4773"},"html":{"href":"https://github.com/bolt/bolt/pull/4773"},"issue":{"href":"https://api.github.com/repos/bolt/bolt/issues/4773"},"comments":{"href":"https://api.github.com/repos/bolt/bolt/issues/4773/comments"},"review_comments":{"href":"https://api.github.com/repos/bolt/bolt/pulls/4773/comments"},"review_comment":{"href":"https://api.github.com/repos/bolt/bolt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bolt/bolt/pulls/4773/commits"},"statuses":{"href":"https://api.github.com/repos/bolt/bolt/statuses/60a4d8ecde6eeba14b9eaf5a04d563bbee9c451d"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":15,"additions":111,"deletions":5,"changed_files":7}}