{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/8002","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/8002/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/8002/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/8002/events","html_url":"https://github.com/yiisoft/yii2/pull/8002","id":66801159,"number":8002,"title":"Allow indirect modifications of overloaded properties when using MongoDB","user":{"login":"alexandernst","id":89727,"avatar_url":"https://avatars.githubusercontent.com/u/89727?v=3","gravatar_id":"","url":"https://api.github.com/users/alexandernst","html_url":"https://github.com/alexandernst","followers_url":"https://api.github.com/users/alexandernst/followers","following_url":"https://api.github.com/users/alexandernst/following{/other_user}","gists_url":"https://api.github.com/users/alexandernst/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandernst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandernst/subscriptions","organizations_url":"https://api.github.com/users/alexandernst/orgs","repos_url":"https://api.github.com/users/alexandernst/repos","events_url":"https://api.github.com/users/alexandernst/events{/privacy}","received_events_url":"https://api.github.com/users/alexandernst/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-07T07:11:09Z","updated_at":"2015-04-07T08:35:15Z","closed_at":"2015-04-07T08:35:15Z","pull_request":{"url":"https://api.github.com/repos/yiisoft/yii2/pulls/8002","html_url":"https://github.com/yiisoft/yii2/pull/8002","diff_url":"https://github.com/yiisoft/yii2/pull/8002.diff","patch_url":"https://github.com/yiisoft/yii2/pull/8002.patch"},"body":"Take for example this data structure saved in a MongoDB database:\r\n\r\n    _id: '3456345b6serbts34sdfbtsdf',\r\n    type: [\r\n        \"admin\",\r\n        \"client\"\r\n    ],\r\n    personal_info: {\r\n        name: 'Bob',\r\n        surnames: ['', '', '', ''....],\r\n        bday: ISODate(....),\r\n    },\r\n    credentials: {\r\n        email: 'qqq@www.com',\r\n        pass: '123123',\r\n        salt: '2345c2345v345wq'\r\n    }\r\n\r\nGetting the entire document is easy, `$person = Person::find([\"_id\" => \".....\"]);`\r\n\r\nBut modifying any subdocument values is not possible:\r\n\r\n    var_dump($person->credentials);  // <--- works\r\n    var_dump($person->credentials['password']); // <--- works\r\n    $person->credentials[\"password\"] == \"new password\"; // fails with \"Indirect modification of overloaded property\"\r\n\r\nThis patch fixes this and, as far as I'm aware of, it doesn't introduce any bugs or any API breaks."},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/90462596","html_url":"https://github.com/yiisoft/yii2/pull/8002#issuecomment-90462596","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/8002","id":90462596,"user":{"login":"klimov-paul","id":1482054,"avatar_url":"https://avatars.githubusercontent.com/u/1482054?v=3","gravatar_id":"","url":"https://api.github.com/users/klimov-paul","html_url":"https://github.com/klimov-paul","followers_url":"https://api.github.com/users/klimov-paul/followers","following_url":"https://api.github.com/users/klimov-paul/following{/other_user}","gists_url":"https://api.github.com/users/klimov-paul/gists{/gist_id}","starred_url":"https://api.github.com/users/klimov-paul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klimov-paul/subscriptions","organizations_url":"https://api.github.com/users/klimov-paul/orgs","repos_url":"https://api.github.com/users/klimov-paul/repos","events_url":"https://api.github.com/users/klimov-paul/events{/privacy}","received_events_url":"https://api.github.com/users/klimov-paul/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T08:35:15Z","updated_at":"2015-04-07T08:35:15Z","body":"See explanation at #4899: such change will cause more trouble then it solves."}}