{"action":"opened","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/6837","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/6837/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/6837/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/6837/events","html_url":"https://github.com/yiisoft/yii2/issues/6837","id":54078017,"number":6837,"title":"question about models","user":{"login":"yurii-github","id":1162656,"avatar_url":"https://avatars.githubusercontent.com/u/1162656?v=3","gravatar_id":"","url":"https://api.github.com/users/yurii-github","html_url":"https://github.com/yurii-github","followers_url":"https://api.github.com/users/yurii-github/followers","following_url":"https://api.github.com/users/yurii-github/following{/other_user}","gists_url":"https://api.github.com/users/yurii-github/gists{/gist_id}","starred_url":"https://api.github.com/users/yurii-github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurii-github/subscriptions","organizations_url":"https://api.github.com/users/yurii-github/orgs","repos_url":"https://api.github.com/users/yurii-github/repos","events_url":"https://api.github.com/users/yurii-github/events{/privacy}","received_events_url":"https://api.github.com/users/yurii-github/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-12T16:57:33Z","updated_at":"2015-01-12T16:57:33Z","closed_at":null,"body":"i was caught today by models\r\n\r\nin **yii\\db\\ActiveRecord** you must declare attributes in phpdoc with '@property', if declared in class as public you lose access to data from database for  columns with same name, as object will always return data from declared attribute.\r\n\r\nin **yii\\base\\Model** you must declare attributes in class instead, because otherwise you will get unknown property error on access.\r\n\r\n**yii\\db\\ActiveRecord** extends **yii\\base\\Model** but behave differently.\r\n\r\nshould it throw an error that it is not allowed or something? because this thing just silently break code if database attribute equals to declared in class.\r\n\r\nregards\r\n"}}