{"action":"created","issue":{"url":"https://api.github.com/repos/lazychaser/laravel-nestedset/issues/42","labels_url":"https://api.github.com/repos/lazychaser/laravel-nestedset/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/lazychaser/laravel-nestedset/issues/42/comments","events_url":"https://api.github.com/repos/lazychaser/laravel-nestedset/issues/42/events","html_url":"https://github.com/lazychaser/laravel-nestedset/issues/42","id":64857436,"number":42,"title":"pending actions?","user":{"login":"Antonimo","id":612902,"avatar_url":"https://avatars.githubusercontent.com/u/612902?v=3","gravatar_id":"","url":"https://api.github.com/users/Antonimo","html_url":"https://github.com/Antonimo","followers_url":"https://api.github.com/users/Antonimo/followers","following_url":"https://api.github.com/users/Antonimo/following{/other_user}","gists_url":"https://api.github.com/users/Antonimo/gists{/gist_id}","starred_url":"https://api.github.com/users/Antonimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Antonimo/subscriptions","organizations_url":"https://api.github.com/users/Antonimo/orgs","repos_url":"https://api.github.com/users/Antonimo/repos","events_url":"https://api.github.com/users/Antonimo/events{/privacy}","received_events_url":"https://api.github.com/users/Antonimo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-03-27T21:45:52Z","updated_at":"2015-08-24T10:42:47Z","closed_at":null,"body":"What is the idea behind deferred, single action anyway? If I call appendTo I want queries to DB happening.\r\n"},"comment":{"url":"https://api.github.com/repos/lazychaser/laravel-nestedset/issues/comments/134144335","html_url":"https://github.com/lazychaser/laravel-nestedset/issues/42#issuecomment-134144335","issue_url":"https://api.github.com/repos/lazychaser/laravel-nestedset/issues/42","id":134144335,"user":{"login":"merlinus1","id":7201882,"avatar_url":"https://avatars.githubusercontent.com/u/7201882?v=3","gravatar_id":"","url":"https://api.github.com/users/merlinus1","html_url":"https://github.com/merlinus1","followers_url":"https://api.github.com/users/merlinus1/followers","following_url":"https://api.github.com/users/merlinus1/following{/other_user}","gists_url":"https://api.github.com/users/merlinus1/gists{/gist_id}","starred_url":"https://api.github.com/users/merlinus1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/merlinus1/subscriptions","organizations_url":"https://api.github.com/users/merlinus1/orgs","repos_url":"https://api.github.com/users/merlinus1/repos","events_url":"https://api.github.com/users/merlinus1/events{/privacy}","received_events_url":"https://api.github.com/users/merlinus1/received_events","type":"User","site_admin":false},"created_at":"2015-08-24T10:42:47Z","updated_at":"2015-08-24T10:42:47Z","body":"Failing test to show that model does not become dirty:\r\n\r\n```php\r\npublic function testModelIsDirtyAfterDirectAssigment()\r\n{\r\n    $category = Category::create(['name' => 'test']);\r\n    $category->parent_id = 1;\r\n    $this->assertTrue($category->isDirty());\r\n}\r\n```\r\n\r\nI think, setting model dirty is useful, because other code may relay on it.\r\nFor example see: https://github.com/dimsav/laravel-translatable/blob/master/src/Translatable/Translatable.php#L138\r\n\r\nIf model is not dirty parent::save does not get called and $model->callPendingAction() never gets caled."}}