{"action":"opened","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6195","repository_url":"https://api.github.com/repos/orientechnologies/orientdb","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6195/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6195/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6195/events","html_url":"https://github.com/orientechnologies/orientdb/issues/6195","id":156388442,"number":6195,"title":"toJSON object @<key> not accessable","user":{"login":"anywhichway","id":4958795,"avatar_url":"https://avatars.githubusercontent.com/u/4958795?v=3","gravatar_id":"","url":"https://api.github.com/users/anywhichway","html_url":"https://github.com/anywhichway","followers_url":"https://api.github.com/users/anywhichway/followers","following_url":"https://api.github.com/users/anywhichway/following{/other_user}","gists_url":"https://api.github.com/users/anywhichway/gists{/gist_id}","starred_url":"https://api.github.com/users/anywhichway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anywhichway/subscriptions","organizations_url":"https://api.github.com/users/anywhichway/orgs","repos_url":"https://api.github.com/users/anywhichway/repos","events_url":"https://api.github.com/users/anywhichway/events{/privacy}","received_events_url":"https://api.github.com/users/anywhichway/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-23T23:26:05Z","updated_at":"2016-05-23T23:26:05Z","closed_at":null,"body":"## Expected behavior and actual behavior\r\n\r\nInside an onBeforeChange Hook:\r\n\r\n`var  className = doc.field('@class'),\r\n      json = doc.toJSON();\r\n      className===json[\"@class\"] \r\n      // expect true; however fails and print shows json[\"@class\"] as undefined\r\n`\r\n## Steps to reproduce the problem\r\n\r\ncreate a Hook with the above code\r\nattach the Hook to a class definition\r\nchange a document of type class\r\n\r\n## Important Questions\r\n\r\n### Runninng Mode\r\n- [ ] Embedded, using PLOCAL access mode\r\n- [ ] Embedded, using MEMORY access mode\r\n- [ ] Remote\r\n\r\n### Misc\r\n- [ ] I have a distributed setup with multiple servers. How many? \r\n- [ ] I'm using the Enterprise Edition\r\n\r\n### OrientDB Version\r\n- [ ] v2.0.x - Please specify last number: \r\n- [ 17] v2.1.x - Please specify last number: \r\n- [] v2.2.x - Please specify last number: \r\n\r\n### Operating System\r\n- [ ] Linux\r\n- [ ] MacOSX\r\n- [ x] Windows\r\n- [ ] Other Unix\r\n- [ ] Other, name? \r\n\r\n### Java Version\r\n- [ ] 6\r\n- [ ] 7\r\n- [ x] 8\r\n"}}
{"actor":{"display_login":"anywhichway"}}