{"action":"created","issue":{"url":"https://api.github.com/repos/leroy-merlin-br/mongolid-laravel/issues/45","repository_url":"https://api.github.com/repos/leroy-merlin-br/mongolid-laravel","labels_url":"https://api.github.com/repos/leroy-merlin-br/mongolid-laravel/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/leroy-merlin-br/mongolid-laravel/issues/45/comments","events_url":"https://api.github.com/repos/leroy-merlin-br/mongolid-laravel/issues/45/events","html_url":"https://github.com/leroy-merlin-br/mongolid-laravel/issues/45","id":26686920,"node_id":"MDU6SXNzdWUyNjY4NjkyMA==","number":45,"title":"Delete function Issue","user":{"login":"oaloria","id":1816971,"node_id":"MDQ6VXNlcjE4MTY5NzE=","avatar_url":"https://avatars0.githubusercontent.com/u/1816971?v=4","gravatar_id":"","url":"https://api.github.com/users/oaloria","html_url":"https://github.com/oaloria","followers_url":"https://api.github.com/users/oaloria/followers","following_url":"https://api.github.com/users/oaloria/following{/other_user}","gists_url":"https://api.github.com/users/oaloria/gists{/gist_id}","starred_url":"https://api.github.com/users/oaloria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oaloria/subscriptions","organizations_url":"https://api.github.com/users/oaloria/orgs","repos_url":"https://api.github.com/users/oaloria/repos","events_url":"https://api.github.com/users/oaloria/events{/privacy}","received_events_url":"https://api.github.com/users/oaloria/received_events","type":"User","site_admin":false},"labels":[{"id":38127407,"node_id":"MDU6TGFiZWwzODEyNzQwNw==","url":"https://api.github.com/repos/leroy-merlin-br/mongolid-laravel/labels/Bug:%20Not%20confirmed","name":"Bug: Not confirmed","color":"A88080","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2014-01-31T15:08:49Z","updated_at":"2018-10-17T21:03:02Z","closed_at":"2018-10-17T21:03:02Z","author_association":"NONE","body":"Hi there.\n\nI just found an issue on delete function.\nHere is the code:\n\n```\n$Model = new \\Content\\Models\\Blocks;\n$data = $Model->find( \"52ebb8d407983b3816000000\" );\n$data->delete();\n```\n\nIt finds the object fine and on delete returns true, but doesn't delete the object.\nThis issue happens when you have an object embeded with empty content like this:\n\n```\n{\n  _id: ObjectId(\"52ebb8d407983b3816000000\"),\n  name: \"TestClient\",\n  data: {},\n  token: \"TestClient\",\n  created_at: ISODate(\"2014-01-31T14:53:08Z\"),\n  updated_at: ISODate(\"2014-01-31T14:53:08Z\")\n}\n```\n\n(data: {}) generates the issue, if you remove that attribute, then delete works fine.\n\nTo make sure it's a mongolid issue I did a direct delete to the database using Mongo-PHP ->remove function and it worked properly.\n\nThanks in advance.\n"},"comment":{"url":"https://api.github.com/repos/leroy-merlin-br/mongolid-laravel/issues/comments/430788780","html_url":"https://github.com/leroy-merlin-br/mongolid-laravel/issues/45#issuecomment-430788780","issue_url":"https://api.github.com/repos/leroy-merlin-br/mongolid-laravel/issues/45","id":430788780,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDc4ODc4MA==","user":{"login":"ravanscafi","id":6104262,"node_id":"MDQ6VXNlcjYxMDQyNjI=","avatar_url":"https://avatars0.githubusercontent.com/u/6104262?v=4","gravatar_id":"","url":"https://api.github.com/users/ravanscafi","html_url":"https://github.com/ravanscafi","followers_url":"https://api.github.com/users/ravanscafi/followers","following_url":"https://api.github.com/users/ravanscafi/following{/other_user}","gists_url":"https://api.github.com/users/ravanscafi/gists{/gist_id}","starred_url":"https://api.github.com/users/ravanscafi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravanscafi/subscriptions","organizations_url":"https://api.github.com/users/ravanscafi/orgs","repos_url":"https://api.github.com/users/ravanscafi/repos","events_url":"https://api.github.com/users/ravanscafi/events{/privacy}","received_events_url":"https://api.github.com/users/ravanscafi/received_events","type":"User","site_admin":false},"created_at":"2018-10-17T21:03:02Z","updated_at":"2018-10-17T21:03:02Z","author_association":"MEMBER","body":"I've just tried it now and it worked. Perhaps it was fixed in the past few years :laughing: "}}
{"actor":{"display_login":"ravanscafi"}}