{"action":"opened","issue":{"url":"https://api.github.com/repos/stormpath/stormpath-sdk-php/issues/42","labels_url":"https://api.github.com/repos/stormpath/stormpath-sdk-php/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/stormpath/stormpath-sdk-php/issues/42/comments","events_url":"https://api.github.com/repos/stormpath/stormpath-sdk-php/issues/42/events","html_url":"https://github.com/stormpath/stormpath-sdk-php/issues/42","id":73435190,"number":42,"title":"Error when saving Custom Data","user":{"login":"morticue","id":165028,"avatar_url":"https://avatars.githubusercontent.com/u/165028?v=3","gravatar_id":"","url":"https://api.github.com/users/morticue","html_url":"https://github.com/morticue","followers_url":"https://api.github.com/users/morticue/followers","following_url":"https://api.github.com/users/morticue/following{/other_user}","gists_url":"https://api.github.com/users/morticue/gists{/gist_id}","starred_url":"https://api.github.com/users/morticue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morticue/subscriptions","organizations_url":"https://api.github.com/users/morticue/orgs","repos_url":"https://api.github.com/users/morticue/repos","events_url":"https://api.github.com/users/morticue/events{/privacy}","received_events_url":"https://api.github.com/users/morticue/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-05T21:20:52Z","updated_at":"2015-05-05T21:20:52Z","closed_at":null,"body":"I have encountered an error when I try to save to the Custom Data object of an Account.\r\n\r\nThis code below works, I can verify the newly saved data in the stormpath gui at https://api.stormpath.com/login . The variable `$account` is an object of class `Stormpath\\Resource\\Account` .\r\n\r\n```\r\n1. $customData = $account->getCustomData();\r\n2. // $customData->foo;\r\n3. $customData->foo = [1, 2];\r\n4. $customData->save();\r\n```\r\n\r\nHowever, if I uncomment line 2. I get an error on line 4 with `code 3003`:\r\n\"Property name 'createdAt' is invalid. Property names may not equal any of the following reserved names: 'href', 'createdAt', 'modifiedAt', meta', 'spMeta', 'spmeta', 'ionmeta', or 'ionMeta'.\"\r\n\r\nIt seems there is some kind of bug in the library which sets that createdAt-property if I read from the CustomData object, which prevent saving to it. If I dont read something from it first, it works to save to it."}}