{"action":"created","issue":{"url":"https://api.github.com/repos/MetaModels/core/issues/894","labels_url":"https://api.github.com/repos/MetaModels/core/issues/894/labels{/name}","comments_url":"https://api.github.com/repos/MetaModels/core/issues/894/comments","events_url":"https://api.github.com/repos/MetaModels/core/issues/894/events","html_url":"https://github.com/MetaModels/core/issues/894","id":111813878,"number":894,"title":"Critical bug in MetaModel::save","user":{"login":"dmolineus","id":1186266,"avatar_url":"https://avatars.githubusercontent.com/u/1186266?v=3","gravatar_id":"","url":"https://api.github.com/users/dmolineus","html_url":"https://github.com/dmolineus","followers_url":"https://api.github.com/users/dmolineus/followers","following_url":"https://api.github.com/users/dmolineus/following{/other_user}","gists_url":"https://api.github.com/users/dmolineus/gists{/gist_id}","starred_url":"https://api.github.com/users/dmolineus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmolineus/subscriptions","organizations_url":"https://api.github.com/users/dmolineus/orgs","repos_url":"https://api.github.com/users/dmolineus/repos","events_url":"https://api.github.com/users/dmolineus/events{/privacy}","received_events_url":"https://api.github.com/users/dmolineus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MetaModels/core/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/MetaModels/core/labels/question","name":"question","color":"cc317c"},{"url":"https://api.github.com/repos/MetaModels/core/labels/testing","name":"testing","color":"DDDDDD"}],"state":"open","locked":false,"assignee":{"login":"stefanheimes","id":988286,"avatar_url":"https://avatars.githubusercontent.com/u/988286?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanheimes","html_url":"https://github.com/stefanheimes","followers_url":"https://api.github.com/users/stefanheimes/followers","following_url":"https://api.github.com/users/stefanheimes/following{/other_user}","gists_url":"https://api.github.com/users/stefanheimes/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanheimes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanheimes/subscriptions","organizations_url":"https://api.github.com/users/stefanheimes/orgs","repos_url":"https://api.github.com/users/stefanheimes/repos","events_url":"https://api.github.com/users/stefanheimes/events{/privacy}","received_events_url":"https://api.github.com/users/stefanheimes/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/MetaModels/core/milestones/6","html_url":"https://github.com/MetaModels/core/milestones/2.0.0","labels_url":"https://api.github.com/repos/MetaModels/core/milestones/6/labels","id":570078,"number":6,"title":"2.0.0","description":"","creator":{"login":"discordier","id":940331,"avatar_url":"https://avatars.githubusercontent.com/u/940331?v=3","gravatar_id":"","url":"https://api.github.com/users/discordier","html_url":"https://github.com/discordier","followers_url":"https://api.github.com/users/discordier/followers","following_url":"https://api.github.com/users/discordier/following{/other_user}","gists_url":"https://api.github.com/users/discordier/gists{/gist_id}","starred_url":"https://api.github.com/users/discordier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/discordier/subscriptions","organizations_url":"https://api.github.com/users/discordier/orgs","repos_url":"https://api.github.com/users/discordier/repos","events_url":"https://api.github.com/users/discordier/events{/privacy}","received_events_url":"https://api.github.com/users/discordier/received_events","type":"User","site_admin":false},"open_issues":64,"closed_issues":184,"state":"open","created_at":"2014-02-15T02:26:48Z","updated_at":"2015-11-25T21:45:44Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-10-16T11:38:10Z","updated_at":"2015-11-25T22:51:28Z","closed_at":null,"body":"When a MetaModel item which is loaded with a subset of it's attributes is saved using the API all other attributes values will get lost when saving the item.\r\n\r\n```php\r\n<?php\r\n\r\n$item     = $metaModel->findById(5, array('visitors'));\r\n$visitors = $item->get('visitors') + 1;\r\n\r\n$item->set('visitors', $visitors);\r\n$item->save(); // Now all other attributes when visitors get lost\r\n```\r\n "},"comment":{"url":"https://api.github.com/repos/MetaModels/core/issues/comments/159749408","html_url":"https://github.com/MetaModels/core/issues/894#issuecomment-159749408","issue_url":"https://api.github.com/repos/MetaModels/core/issues/894","id":159749408,"user":{"login":"stefanheimes","id":988286,"avatar_url":"https://avatars.githubusercontent.com/u/988286?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanheimes","html_url":"https://github.com/stefanheimes","followers_url":"https://api.github.com/users/stefanheimes/followers","following_url":"https://api.github.com/users/stefanheimes/following{/other_user}","gists_url":"https://api.github.com/users/stefanheimes/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanheimes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanheimes/subscriptions","organizations_url":"https://api.github.com/users/stefanheimes/orgs","repos_url":"https://api.github.com/users/stefanheimes/repos","events_url":"https://api.github.com/users/stefanheimes/events{/privacy}","received_events_url":"https://api.github.com/users/stefanheimes/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T22:51:28Z","updated_at":"2015-11-25T22:51:28Z","body":"The bugfix was added with the 2.0.0-alpha3. Pleas test it with this version or the current one 2.0.0-alpha6. @dmolineus "}}