{"action":"created","issue":{"url":"https://api.github.com/repos/atk4/data/issues/291","repository_url":"https://api.github.com/repos/atk4/data","labels_url":"https://api.github.com/repos/atk4/data/issues/291/labels{/name}","comments_url":"https://api.github.com/repos/atk4/data/issues/291/comments","events_url":"https://api.github.com/repos/atk4/data/issues/291/events","html_url":"https://github.com/atk4/data/issues/291","id":296004636,"number":291,"title":"Should action('xyz')->execute() trigger hooks?","user":{"login":"PhilippGrashoff","id":33204878,"avatar_url":"https://avatars0.githubusercontent.com/u/33204878?v=4","gravatar_id":"","url":"https://api.github.com/users/PhilippGrashoff","html_url":"https://github.com/PhilippGrashoff","followers_url":"https://api.github.com/users/PhilippGrashoff/followers","following_url":"https://api.github.com/users/PhilippGrashoff/following{/other_user}","gists_url":"https://api.github.com/users/PhilippGrashoff/gists{/gist_id}","starred_url":"https://api.github.com/users/PhilippGrashoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhilippGrashoff/subscriptions","organizations_url":"https://api.github.com/users/PhilippGrashoff/orgs","repos_url":"https://api.github.com/users/PhilippGrashoff/repos","events_url":"https://api.github.com/users/PhilippGrashoff/events{/privacy}","received_events_url":"https://api.github.com/users/PhilippGrashoff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"romaninsh","id":453929,"avatar_url":"https://avatars0.githubusercontent.com/u/453929?v=4","gravatar_id":"","url":"https://api.github.com/users/romaninsh","html_url":"https://github.com/romaninsh","followers_url":"https://api.github.com/users/romaninsh/followers","following_url":"https://api.github.com/users/romaninsh/following{/other_user}","gists_url":"https://api.github.com/users/romaninsh/gists{/gist_id}","starred_url":"https://api.github.com/users/romaninsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romaninsh/subscriptions","organizations_url":"https://api.github.com/users/romaninsh/orgs","repos_url":"https://api.github.com/users/romaninsh/repos","events_url":"https://api.github.com/users/romaninsh/events{/privacy}","received_events_url":"https://api.github.com/users/romaninsh/received_events","type":"User","site_admin":false},"assignees":[{"login":"romaninsh","id":453929,"avatar_url":"https://avatars0.githubusercontent.com/u/453929?v=4","gravatar_id":"","url":"https://api.github.com/users/romaninsh","html_url":"https://github.com/romaninsh","followers_url":"https://api.github.com/users/romaninsh/followers","following_url":"https://api.github.com/users/romaninsh/following{/other_user}","gists_url":"https://api.github.com/users/romaninsh/gists{/gist_id}","starred_url":"https://api.github.com/users/romaninsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romaninsh/subscriptions","organizations_url":"https://api.github.com/users/romaninsh/orgs","repos_url":"https://api.github.com/users/romaninsh/repos","events_url":"https://api.github.com/users/romaninsh/events{/privacy}","received_events_url":"https://api.github.com/users/romaninsh/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-02-09T20:39:13Z","updated_at":"2018-02-14T09:32:55Z","closed_at":null,"author_association":"NONE","body":"Hi there,\r\n\r\nI just stumbled across this:\r\n```\r\nif($grtt->loaded()) {\r\n    $grtt->delete();\r\n}\r\n```\r\nbeforeDelete Hook is triggered\r\n\r\n```\r\nif($grtt->loaded()) {\r\n    $grtt->action('delete')->execute();\r\n}\r\n```\r\n\r\nbeforeDelete Hook is **not** triggered.\r\nIs this intended behaviour?\r\n\r\nBest regards\r\nPhilipp\r\n"},"comment":{"url":"https://api.github.com/repos/atk4/data/issues/comments/365546632","html_url":"https://github.com/atk4/data/issues/291#issuecomment-365546632","issue_url":"https://api.github.com/repos/atk4/data/issues/291","id":365546632,"user":{"login":"romaninsh","id":453929,"avatar_url":"https://avatars0.githubusercontent.com/u/453929?v=4","gravatar_id":"","url":"https://api.github.com/users/romaninsh","html_url":"https://github.com/romaninsh","followers_url":"https://api.github.com/users/romaninsh/followers","following_url":"https://api.github.com/users/romaninsh/following{/other_user}","gists_url":"https://api.github.com/users/romaninsh/gists{/gist_id}","starred_url":"https://api.github.com/users/romaninsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romaninsh/subscriptions","organizations_url":"https://api.github.com/users/romaninsh/orgs","repos_url":"https://api.github.com/users/romaninsh/repos","events_url":"https://api.github.com/users/romaninsh/events{/privacy}","received_events_url":"https://api.github.com/users/romaninsh/received_events","type":"User","site_admin":false},"created_at":"2018-02-14T09:32:55Z","updated_at":"2018-02-14T09:32:55Z","author_association":"OWNER","body":"Yes, that is correct. The approach above is similar to executing direct query. It's much faster, but each record data won't be available and all records will be deleted simultaniously. \r\n\r\nTechnically we could have 'beforeDeleteQuery' or 'beforeDeleteAction' but there is no policy on how to do it. Something to consider for implementing across all actions. "}}
{"actor":{"display_login":"romaninsh"}}