{"action":"created","issue":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/10596","labels_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10596/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10596/comments","events_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10596/events","html_url":"https://github.com/phalcon/cphalcon/issues/10596","id":93280840,"number":10596,"title":"FindFirst creates 2 instances of my model","user":{"login":"ruudboon","id":7444246,"avatar_url":"https://avatars.githubusercontent.com/u/7444246?v=3","gravatar_id":"","url":"https://api.github.com/users/ruudboon","html_url":"https://github.com/ruudboon","followers_url":"https://api.github.com/users/ruudboon/followers","following_url":"https://api.github.com/users/ruudboon/following{/other_user}","gists_url":"https://api.github.com/users/ruudboon/gists{/gist_id}","starred_url":"https://api.github.com/users/ruudboon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruudboon/subscriptions","organizations_url":"https://api.github.com/users/ruudboon/orgs","repos_url":"https://api.github.com/users/ruudboon/repos","events_url":"https://api.github.com/users/ruudboon/events{/privacy}","received_events_url":"https://api.github.com/users/ruudboon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-06T13:39:00Z","updated_at":"2015-07-06T14:56:27Z","closed_at":null,"body":"I got a model that extends the Phalcon\\Mvc\\Model;\r\nWhen I load a model with MyModel::findFirst(ID) it returns the loaded model.\r\nUnfortunately it looks like the initialize method is not called.\r\nWhen logging the object hash in the initialize() with spl_object_hash($this) and the logging the object hash of the returned model I found out that they don't match. \r\nIt looks like the initialize is called but the returned object is different then the initialised object. Running on Phalcon 2.0.3 \r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/comments/118880238","html_url":"https://github.com/phalcon/cphalcon/issues/10596#issuecomment-118880238","issue_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10596","id":118880238,"user":{"login":"ruudboon","id":7444246,"avatar_url":"https://avatars.githubusercontent.com/u/7444246?v=3","gravatar_id":"","url":"https://api.github.com/users/ruudboon","html_url":"https://github.com/ruudboon","followers_url":"https://api.github.com/users/ruudboon/followers","following_url":"https://api.github.com/users/ruudboon/following{/other_user}","gists_url":"https://api.github.com/users/ruudboon/gists{/gist_id}","starred_url":"https://api.github.com/users/ruudboon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruudboon/subscriptions","organizations_url":"https://api.github.com/users/ruudboon/orgs","repos_url":"https://api.github.com/users/ruudboon/repos","events_url":"https://api.github.com/users/ruudboon/events{/privacy}","received_events_url":"https://api.github.com/users/ruudboon/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T14:56:27Z","updated_at":"2015-07-06T14:56:27Z","body":"Ok. Thnx that for clearing why theres is only 1 call to the initialise. \r\nBrings me back to my original problem. \r\nI'm setting some private member variables on the model in the init. \r\nThose vars are all cleared in the returned model. This is causing an issue for me. It was working in 1.3.4.\r\n\r\nI can easily change it to onConstruct but I assume that setting a member var in the initialise should effect the new instances."}}