{"action":"created","comment":{"url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/pulls/comments/48714077","id":48714077,"diff_hunk":"@@ -0,0 +1,63 @@\n+Prevent document suppression when they are embedded\n+===================================================\n+\n+Context\n+-------\n+\n+In a document oriented database (like Mongo), to improve performances, a standard practice is to avoid relations\n+between documents using embed documents. However, when you want to suppress a document that is used by other\n+documents a little issue can appear.\n+\n+In our case, the Open Orchestra Backoffice presents some status that can be used in multiple\n+documents like the ``Node``, ``Content``, ``Role``, ... . Deleting a ``Status`` document could lead\n+to a loss of consistence from the database.\n+\n+Open Orchestra implementation example\n+-------------------------------------\n+\n+In Open Orchestra, if you look to the ``DeleteStatusVoter`` you will see it using the\n+``StatusUsageFinder`` to check if the ``Status`` can be deleted.\n+\n+If you add a document which implements ``StatusableInterface`` :","path":"en/developer_guide/prevent_document_suppression_when_embed.rst","position":21,"original_position":21,"commit_id":"830a4d08c4790840dfab6480bca66a1e9f36143c","original_commit_id":"830a4d08c4790840dfab6480bca66a1e9f36143c","user":{"login":"itkg-ngilain","id":6725138,"avatar_url":"https://avatars.githubusercontent.com/u/6725138?v=3","gravatar_id":"","url":"https://api.github.com/users/itkg-ngilain","html_url":"https://github.com/itkg-ngilain","followers_url":"https://api.github.com/users/itkg-ngilain/followers","following_url":"https://api.github.com/users/itkg-ngilain/following{/other_user}","gists_url":"https://api.github.com/users/itkg-ngilain/gists{/gist_id}","starred_url":"https://api.github.com/users/itkg-ngilain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itkg-ngilain/subscriptions","organizations_url":"https://api.github.com/users/itkg-ngilain/orgs","repos_url":"https://api.github.com/users/itkg-ngilain/repos","events_url":"https://api.github.com/users/itkg-ngilain/events{/privacy}","received_events_url":"https://api.github.com/users/itkg-ngilain/received_events","type":"User","site_admin":false},"body":"If you add a document implementing ``StatusableInterface``","created_at":"2016-01-04T09:21:56Z","updated_at":"2016-01-04T09:21:56Z","html_url":"https://github.com/open-orchestra/open-orchestra-docs/pull/137#discussion_r48714077","pull_request_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/pulls/137","_links":{"self":{"href":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/pulls/comments/48714077"},"html":{"href":"https://github.com/open-orchestra/open-orchestra-docs/pull/137#discussion_r48714077"},"pull_request":{"href":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/pulls/137"}}},"pull_request":{"url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/pulls/137","id":54123411,"html_url":"https://github.com/open-orchestra/open-orchestra-docs/pull/137","diff_url":"https://github.com/open-orchestra/open-orchestra-docs/pull/137.diff","patch_url":"https://github.com/open-orchestra/open-orchestra-docs/pull/137.patch","issue_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/issues/137","number":137,"state":"open","locked":false,"title":"add prevent status delete documentation","user":{"login":"nicolasThal","id":2675545,"avatar_url":"https://avatars.githubusercontent.com/u/2675545?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolasThal","html_url":"https://github.com/nicolasThal","followers_url":"https://api.github.com/users/nicolasThal/followers","following_url":"https://api.github.com/users/nicolasThal/following{/other_user}","gists_url":"https://api.github.com/users/nicolasThal/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasThal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasThal/subscriptions","organizations_url":"https://api.github.com/users/nicolasThal/orgs","repos_url":"https://api.github.com/users/nicolasThal/repos","events_url":"https://api.github.com/users/nicolasThal/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasThal/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-18T16:43:46Z","updated_at":"2016-01-04T09:21:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6af057875482ccd3394474fdfddb48c092825a33","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/pulls/137/commits","review_comments_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/pulls/137/comments","review_comment_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/issues/137/comments","statuses_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/statuses/830a4d08c4790840dfab6480bca66a1e9f36143c","head":{"label":"open-orchestra:document_usage_check","ref":"document_usage_check","sha":"830a4d08c4790840dfab6480bca66a1e9f36143c","user":{"login":"open-orchestra","id":11756116,"avatar_url":"https://avatars.githubusercontent.com/u/11756116?v=3","gravatar_id":"","url":"https://api.github.com/users/open-orchestra","html_url":"https://github.com/open-orchestra","followers_url":"https://api.github.com/users/open-orchestra/followers","following_url":"https://api.github.com/users/open-orchestra/following{/other_user}","gists_url":"https://api.github.com/users/open-orchestra/gists{/gist_id}","starred_url":"https://api.github.com/users/open-orchestra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-orchestra/subscriptions","organizations_url":"https://api.github.com/users/open-orchestra/orgs","repos_url":"https://api.github.com/users/open-orchestra/repos","events_url":"https://api.github.com/users/open-orchestra/events{/privacy}","received_events_url":"https://api.github.com/users/open-orchestra/received_events","type":"Organization","site_admin":false},"repo":{"id":33729445,"name":"open-orchestra-docs","full_name":"open-orchestra/open-orchestra-docs","owner":{"login":"open-orchestra","id":11756116,"avatar_url":"https://avatars.githubusercontent.com/u/11756116?v=3","gravatar_id":"","url":"https://api.github.com/users/open-orchestra","html_url":"https://github.com/open-orchestra","followers_url":"https://api.github.com/users/open-orchestra/followers","following_url":"https://api.github.com/users/open-orchestra/following{/other_user}","gists_url":"https://api.github.com/users/open-orchestra/gists{/gist_id}","starred_url":"https://api.github.com/users/open-orchestra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-orchestra/subscriptions","organizations_url":"https://api.github.com/users/open-orchestra/orgs","repos_url":"https://api.github.com/users/open-orchestra/repos","events_url":"https://api.github.com/users/open-orchestra/events{/privacy}","received_events_url":"https://api.github.com/users/open-orchestra/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/open-orchestra/open-orchestra-docs","description":"The Open Orchestra project documentation","fork":false,"url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs","forks_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/forks","keys_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/teams","hooks_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/hooks","issue_events_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/issues/events{/number}","events_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/events","assignees_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/assignees{/user}","branches_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/branches{/branch}","tags_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/tags","blobs_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/languages","stargazers_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/stargazers","contributors_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/contributors","subscribers_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/subscribers","subscription_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/subscription","commits_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/contents/{+path}","compare_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/merges","archive_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/downloads","issues_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/issues{/number}","pulls_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/labels{/name}","releases_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/releases{/id}","created_at":"2015-04-10T13:19:49Z","updated_at":"2015-07-28T15:20:12Z","pushed_at":"2015-12-31T14:27:09Z","git_url":"git://github.com/open-orchestra/open-orchestra-docs.git","ssh_url":"git@github.com:open-orchestra/open-orchestra-docs.git","clone_url":"https://github.com/open-orchestra/open-orchestra-docs.git","svn_url":"https://github.com/open-orchestra/open-orchestra-docs","homepage":null,"size":1671,"stargazers_count":3,"watchers_count":3,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":10,"forks":3,"open_issues":10,"watchers":3,"default_branch":"master"}},"base":{"label":"open-orchestra:master","ref":"master","sha":"f678bf00e54a39919fc2a9e1159b1ac8b2640ad8","user":{"login":"open-orchestra","id":11756116,"avatar_url":"https://avatars.githubusercontent.com/u/11756116?v=3","gravatar_id":"","url":"https://api.github.com/users/open-orchestra","html_url":"https://github.com/open-orchestra","followers_url":"https://api.github.com/users/open-orchestra/followers","following_url":"https://api.github.com/users/open-orchestra/following{/other_user}","gists_url":"https://api.github.com/users/open-orchestra/gists{/gist_id}","starred_url":"https://api.github.com/users/open-orchestra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-orchestra/subscriptions","organizations_url":"https://api.github.com/users/open-orchestra/orgs","repos_url":"https://api.github.com/users/open-orchestra/repos","events_url":"https://api.github.com/users/open-orchestra/events{/privacy}","received_events_url":"https://api.github.com/users/open-orchestra/received_events","type":"Organization","site_admin":false},"repo":{"id":33729445,"name":"open-orchestra-docs","full_name":"open-orchestra/open-orchestra-docs","owner":{"login":"open-orchestra","id":11756116,"avatar_url":"https://avatars.githubusercontent.com/u/11756116?v=3","gravatar_id":"","url":"https://api.github.com/users/open-orchestra","html_url":"https://github.com/open-orchestra","followers_url":"https://api.github.com/users/open-orchestra/followers","following_url":"https://api.github.com/users/open-orchestra/following{/other_user}","gists_url":"https://api.github.com/users/open-orchestra/gists{/gist_id}","starred_url":"https://api.github.com/users/open-orchestra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-orchestra/subscriptions","organizations_url":"https://api.github.com/users/open-orchestra/orgs","repos_url":"https://api.github.com/users/open-orchestra/repos","events_url":"https://api.github.com/users/open-orchestra/events{/privacy}","received_events_url":"https://api.github.com/users/open-orchestra/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/open-orchestra/open-orchestra-docs","description":"The Open Orchestra project documentation","fork":false,"url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs","forks_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/forks","keys_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/teams","hooks_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/hooks","issue_events_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/issues/events{/number}","events_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/events","assignees_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/assignees{/user}","branches_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/branches{/branch}","tags_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/tags","blobs_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/languages","stargazers_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/stargazers","contributors_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/contributors","subscribers_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/subscribers","subscription_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/subscription","commits_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/contents/{+path}","compare_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/merges","archive_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/downloads","issues_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/issues{/number}","pulls_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/labels{/name}","releases_url":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/releases{/id}","created_at":"2015-04-10T13:19:49Z","updated_at":"2015-07-28T15:20:12Z","pushed_at":"2015-12-31T14:27:09Z","git_url":"git://github.com/open-orchestra/open-orchestra-docs.git","ssh_url":"git@github.com:open-orchestra/open-orchestra-docs.git","clone_url":"https://github.com/open-orchestra/open-orchestra-docs.git","svn_url":"https://github.com/open-orchestra/open-orchestra-docs","homepage":null,"size":1671,"stargazers_count":3,"watchers_count":3,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":10,"forks":3,"open_issues":10,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/pulls/137"},"html":{"href":"https://github.com/open-orchestra/open-orchestra-docs/pull/137"},"issue":{"href":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/issues/137"},"comments":{"href":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/issues/137/comments"},"review_comments":{"href":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/pulls/137/comments"},"review_comment":{"href":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/pulls/137/commits"},"statuses":{"href":"https://api.github.com/repos/open-orchestra/open-orchestra-docs/statuses/830a4d08c4790840dfab6480bca66a1e9f36143c"}}}}