{"action":"created","issue":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/10886","labels_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10886/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10886/comments","events_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10886/events","html_url":"https://github.com/phalcon/cphalcon/issues/10886","id":104780265,"number":10886,"title":"Can't save relation in model if alias is camelCase","user":{"login":"nsossonko","id":8125151,"avatar_url":"https://avatars.githubusercontent.com/u/8125151?v=3","gravatar_id":"","url":"https://api.github.com/users/nsossonko","html_url":"https://github.com/nsossonko","followers_url":"https://api.github.com/users/nsossonko/followers","following_url":"https://api.github.com/users/nsossonko/following{/other_user}","gists_url":"https://api.github.com/users/nsossonko/gists{/gist_id}","starred_url":"https://api.github.com/users/nsossonko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsossonko/subscriptions","organizations_url":"https://api.github.com/users/nsossonko/orgs","repos_url":"https://api.github.com/users/nsossonko/repos","events_url":"https://api.github.com/users/nsossonko/events{/privacy}","received_events_url":"https://api.github.com/users/nsossonko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-09-03T20:56:58Z","updated_at":"2015-10-14T05:43:02Z","closed_at":null,"body":"Model Foo has a bidirectional belongsTo/hasMany relationship with model BarBaz. In the relationship on Foo we aliased BarBaz as barBaz. If we try to save the model as follows:\r\n\r\n```php\r\n$foo = new Foo();\r\n$barBaz = new BarBaz();\r\n$foo->barBaz = $barBaz;\r\n$foo->create();\r\n```\r\n\r\nIt screws up $foo (getMessages returns null [not even empty array, null] and the create call returns null). The creation also does not work. However, if the following is done:\r\n\r\n```php\r\n$foo = new Foo();\r\n$barBaz = new BarBaz();\r\n$foo->barbaz = $barBaz;\r\n$foo->create();\r\n```\r\n\r\nIt will work properly. $foo->barBaz will be empty but $foo->barbaz will contain the nested relation and both will have been created."},"comment":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/comments/147941131","html_url":"https://github.com/phalcon/cphalcon/issues/10886#issuecomment-147941131","issue_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10886","id":147941131,"user":{"login":"tobasar","id":11665490,"avatar_url":"https://avatars.githubusercontent.com/u/11665490?v=3","gravatar_id":"","url":"https://api.github.com/users/tobasar","html_url":"https://github.com/tobasar","followers_url":"https://api.github.com/users/tobasar/followers","following_url":"https://api.github.com/users/tobasar/following{/other_user}","gists_url":"https://api.github.com/users/tobasar/gists{/gist_id}","starred_url":"https://api.github.com/users/tobasar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobasar/subscriptions","organizations_url":"https://api.github.com/users/tobasar/orgs","repos_url":"https://api.github.com/users/tobasar/repos","events_url":"https://api.github.com/users/tobasar/events{/privacy}","received_events_url":"https://api.github.com/users/tobasar/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T05:43:02Z","updated_at":"2015-10-14T05:43:02Z","body":"Broken strtolower perhaps? I saw no strtolower unit test yet"}}