{"action":"closed","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4848","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4848/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4848/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4848/events","html_url":"https://github.com/orientechnologies/orientdb/issues/4848","id":102942638,"number":4848,"title":"ODocument class change doesn't work","user":{"login":"PhantomYdn","id":1199285,"avatar_url":"https://avatars.githubusercontent.com/u/1199285?v=3","gravatar_id":"","url":"https://api.github.com/users/PhantomYdn","html_url":"https://github.com/PhantomYdn","followers_url":"https://api.github.com/users/PhantomYdn/followers","following_url":"https://api.github.com/users/PhantomYdn/following{/other_user}","gists_url":"https://api.github.com/users/PhantomYdn/gists{/gist_id}","starred_url":"https://api.github.com/users/PhantomYdn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhantomYdn/subscriptions","organizations_url":"https://api.github.com/users/PhantomYdn/orgs","repos_url":"https://api.github.com/users/PhantomYdn/repos","events_url":"https://api.github.com/users/PhantomYdn/events{/privacy}","received_events_url":"https://api.github.com/users/PhantomYdn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-25T03:42:32Z","updated_at":"2015-08-26T01:48:34Z","closed_at":"2015-08-26T01:48:34Z","body":"Guys,\r\n\r\nThere is the following testcase which is failing:\r\n\r\n```java\r\n@Test\r\n\tpublic void testClassChange()\r\n\t{\r\n\t\tODatabaseDocument db = wicket.getTester().getDatabase();\r\n\t\tOSchema schema = db.getMetadata().getSchema();\r\n\t\tOClass classA = schema.createClass(\"TestClassChangeA\");\r\n\t\tOClass classB = schema.createClass(\"TestClassChangeB\");\r\n\t\tODocument doc = new ODocument(classA);\r\n\t\tdoc.save();\r\n\t\tdoc = doc.getIdentity().getRecord();\r\n\t\tdoc.setClassName(classB.getName());\r\n\t\tassertEquals(classB.getName(), doc.getClassName());\r\n\t\tdoc = doc.getIdentity().getRecord();\r\n\t\tassertEquals(classB.getName(), doc.getClassName());\r\n\t\tORID id = doc.getIdentity();\r\n\t\tdb.commit(true);\r\n\t\tdb.close();\r\n\t\tdb = wicket.getTester().getDatabase();\r\n\t\tdoc = id.getRecord();\r\n\t\tassertEquals(classB.getName(), doc.getClassName());\r\n\t}\r\n```\r\n\r\nIt's failing on last line when other DB has been used to retrieve the record with changed class."}}