{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/6327","repository_url":"https://api.github.com/repos/cakephp/cakephp","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/6327/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/6327/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/6327/events","html_url":"https://github.com/cakephp/cakephp/issues/6327","id":68109402,"number":6327,"title":"Rule to prevent deletion of records with associated data","user":{"login":"efanzini","id":2932320,"avatar_url":"https://avatars.githubusercontent.com/u/2932320?v=3","gravatar_id":"","url":"https://api.github.com/users/efanzini","html_url":"https://github.com/efanzini","followers_url":"https://api.github.com/users/efanzini/followers","following_url":"https://api.github.com/users/efanzini/following{/other_user}","gists_url":"https://api.github.com/users/efanzini/gists{/gist_id}","starred_url":"https://api.github.com/users/efanzini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/efanzini/subscriptions","organizations_url":"https://api.github.com/users/efanzini/orgs","repos_url":"https://api.github.com/users/efanzini/repos","events_url":"https://api.github.com/users/efanzini/events{/privacy}","received_events_url":"https://api.github.com/users/efanzini/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/cakephp/labels/Enhancement","name":"Enhancement","color":"bfe5bf"},{"url":"https://api.github.com/repos/cakephp/cakephp/labels/ORM","name":"ORM","color":"ffffff"},{"url":"https://api.github.com/repos/cakephp/cakephp/labels/validation","name":"validation","color":"FFFFFF"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/69","html_url":"https://github.com/cakephp/cakephp/milestones/3.3.0","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/69/labels","id":1443324,"number":69,"title":"3.3.0","description":"A backwards compatible feature release for 3.x. See the [3.3 Roadmap](https://github.com/cakephp/cakephp/wiki/3.3-Roadmap)","creator":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"open_issues":75,"closed_issues":87,"state":"open","created_at":"2015-12-04T02:24:56Z","updated_at":"2016-05-20T22:54:49Z","due_on":"2016-07-24T04:00:00Z","closed_at":null},"comments":10,"created_at":"2015-04-13T14:19:34Z","updated_at":"2016-05-21T07:48:17Z","closed_at":"2016-05-20T22:54:49Z","body":"It would be nice to have a built-in rule to prevent deletion of records with associated data, especially when working with dbs that doesn't support foreign key costraints (SQLite < 3.6)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/220764451","html_url":"https://github.com/cakephp/cakephp/issues/6327#issuecomment-220764451","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/6327","id":220764451,"user":{"login":"ndm2","id":5031606,"avatar_url":"https://avatars.githubusercontent.com/u/5031606?v=3","gravatar_id":"","url":"https://api.github.com/users/ndm2","html_url":"https://github.com/ndm2","followers_url":"https://api.github.com/users/ndm2/followers","following_url":"https://api.github.com/users/ndm2/following{/other_user}","gists_url":"https://api.github.com/users/ndm2/gists{/gist_id}","starred_url":"https://api.github.com/users/ndm2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndm2/subscriptions","organizations_url":"https://api.github.com/users/ndm2/orgs","repos_url":"https://api.github.com/users/ndm2/repos","events_url":"https://api.github.com/users/ndm2/events{/privacy}","received_events_url":"https://api.github.com/users/ndm2/received_events","type":"User","site_admin":false},"created_at":"2016-05-21T07:48:17Z","updated_at":"2016-05-21T07:48:17Z","body":"I'm using such a rule for my projects as foreign key constraints are used on regular basis, and inspecting PDO exceptions that are normally thrown is rather tedious. Instead of returing a boolean, the rule throws custom exceptions which can easily be evaluated in the controller.\r\n\r\nI can wrap it up and push a PR in case this would be of interest?"}}
{"actor":{"display_login":"ndm2"}}