{"action":"created","issue":{"url":"https://api.github.com/repos/neo4jrb/neo4j/issues/723","labels_url":"https://api.github.com/repos/neo4jrb/neo4j/issues/723/labels{/name}","comments_url":"https://api.github.com/repos/neo4jrb/neo4j/issues/723/comments","events_url":"https://api.github.com/repos/neo4jrb/neo4j/issues/723/events","html_url":"https://github.com/neo4jrb/neo4j/issues/723","id":63102174,"number":723,"title":"initialize / find callbacks do not work","user":{"login":"garmoshka-mo","id":2452269,"avatar_url":"https://avatars.githubusercontent.com/u/2452269?v=3","gravatar_id":"","url":"https://api.github.com/users/garmoshka-mo","html_url":"https://github.com/garmoshka-mo","followers_url":"https://api.github.com/users/garmoshka-mo/followers","following_url":"https://api.github.com/users/garmoshka-mo/following{/other_user}","gists_url":"https://api.github.com/users/garmoshka-mo/gists{/gist_id}","starred_url":"https://api.github.com/users/garmoshka-mo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garmoshka-mo/subscriptions","organizations_url":"https://api.github.com/users/garmoshka-mo/orgs","repos_url":"https://api.github.com/users/garmoshka-mo/repos","events_url":"https://api.github.com/users/garmoshka-mo/events{/privacy}","received_events_url":"https://api.github.com/users/garmoshka-mo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-19T22:10:50Z","updated_at":"2015-03-19T22:28:19Z","closed_at":null,"body":"As described here: https://github.com/neo4jrb/neo4j/wiki/Neo4j%3A%3AActiveNode#callbacks\r\ni expect to have callbacks working, though those do not work:\r\n\r\ntried different variations:\r\n````\r\nafter_initialize\r\ninitialize\r\nbefore_initialize\r\nbefore_find\r\nfind\r\nafter_find\r\n````\r\n\r\nSome of callbacks work, for example those:\r\n\r\n* before_validation / after_validation\r\n* before_create / after_create\r\n* before_save / after_save\r\n\r\nChecked by this code:\r\n\r\n````\r\nclass Te\r\n    include Neo4j::ActiveNode\r\n    property :name\r\n\r\n    before_validation do\r\n      print 'before_validation callback'\r\n    end\r\n\r\n    after_validation do\r\n      print 'after_validation callback'\r\n    end\r\n\r\n  before_initialize do\r\n    print 'before_initialize callback'\r\n  end\r\n\r\n  after_initialize do\r\n    print 'after_initialize callback'\r\n  end\r\n\r\nend\r\n\r\n    n = Te.create(name: '999')\r\n    n.name = 'xxxx'\r\n    n.save\r\n    n.update name: 'yyyyy'\r\n    Te.find_by name: 'xxxx'\r\n\r\n````\r\n\r\nMoreover, when you try to catch after_find / before_find callbacks - \r\nother callbacks which worked in class before - also stop working.\r\n\r\nE.g. here - validation not working anymore:\r\n````\r\nclass Te\r\n\r\n    include Neo4j::ActiveNode\r\n    property :name\r\n\r\n    after_find do\r\n      print 'after_find callback'\r\n    end\r\n\r\n    before_find do\r\n      print 'before_find callback'\r\n    end\r\n\r\n    before_validation do\r\n      print 'before_validation callback'\r\n    end\r\n\r\n    after_validation do\r\n      print 'after_validation callback'\r\n    end\r\n\r\nend\r\n````\r\n\r\nThe last behavior confuses a lot"},"comment":{"url":"https://api.github.com/repos/neo4jrb/neo4j/issues/comments/83786264","html_url":"https://github.com/neo4jrb/neo4j/issues/723#issuecomment-83786264","issue_url":"https://api.github.com/repos/neo4jrb/neo4j/issues/723","id":83786264,"user":{"login":"garmoshka-mo","id":2452269,"avatar_url":"https://avatars.githubusercontent.com/u/2452269?v=3","gravatar_id":"","url":"https://api.github.com/users/garmoshka-mo","html_url":"https://github.com/garmoshka-mo","followers_url":"https://api.github.com/users/garmoshka-mo/followers","following_url":"https://api.github.com/users/garmoshka-mo/following{/other_user}","gists_url":"https://api.github.com/users/garmoshka-mo/gists{/gist_id}","starred_url":"https://api.github.com/users/garmoshka-mo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garmoshka-mo/subscriptions","organizations_url":"https://api.github.com/users/garmoshka-mo/orgs","repos_url":"https://api.github.com/users/garmoshka-mo/repos","events_url":"https://api.github.com/users/garmoshka-mo/events{/privacy}","received_events_url":"https://api.github.com/users/garmoshka-mo/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T22:28:19Z","updated_at":"2015-03-19T22:28:19Z","body":"Maybe it simply was never implemented...\r\n\r\n![screen shot 2015-03-19 at 4 17 49 pm](https://cloud.githubusercontent.com/assets/2452269/6742363/d134a6f4-ce54-11e4-9da8-7770e95ab44e.png)\r\n\r\nDon't know how it should work, but looks like that\r\nNeed at least fix documentation then"}}