{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3254","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3254/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3254/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3254/events","html_url":"https://github.com/orientechnologies/orientdb/issues/3254","id":52599020,"number":3254,"title":"Backwards incompatible API changes to setIdentity, setVersion","user":{"login":"stebbi","id":498148,"avatar_url":"https://avatars.githubusercontent.com/u/498148?v=3","gravatar_id":"","url":"https://api.github.com/users/stebbi","html_url":"https://github.com/stebbi","followers_url":"https://api.github.com/users/stebbi/followers","following_url":"https://api.github.com/users/stebbi/following{/other_user}","gists_url":"https://api.github.com/users/stebbi/gists{/gist_id}","starred_url":"https://api.github.com/users/stebbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stebbi/subscriptions","organizations_url":"https://api.github.com/users/stebbi/orgs","repos_url":"https://api.github.com/users/stebbi/repos","events_url":"https://api.github.com/users/stebbi/events{/privacy}","received_events_url":"https://api.github.com/users/stebbi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":{"login":"tglman","id":424369,"avatar_url":"https://avatars.githubusercontent.com/u/424369?v=3","gravatar_id":"","url":"https://api.github.com/users/tglman","html_url":"https://github.com/tglman","followers_url":"https://api.github.com/users/tglman/followers","following_url":"https://api.github.com/users/tglman/following{/other_user}","gists_url":"https://api.github.com/users/tglman/gists{/gist_id}","starred_url":"https://api.github.com/users/tglman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tglman/subscriptions","organizations_url":"https://api.github.com/users/tglman/orgs","repos_url":"https://api.github.com/users/tglman/repos","events_url":"https://api.github.com/users/tglman/events{/privacy}","received_events_url":"https://api.github.com/users/tglman/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/35","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/35/labels","id":932020,"number":35,"title":"2.0-rc2","description":"2.0 Release Candidate 2","creator":{"login":"lvca","id":312606,"avatar_url":"https://avatars.githubusercontent.com/u/312606?v=3","gravatar_id":"","url":"https://api.github.com/users/lvca","html_url":"https://github.com/lvca","followers_url":"https://api.github.com/users/lvca/followers","following_url":"https://api.github.com/users/lvca/following{/other_user}","gists_url":"https://api.github.com/users/lvca/gists{/gist_id}","starred_url":"https://api.github.com/users/lvca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvca/subscriptions","organizations_url":"https://api.github.com/users/lvca/orgs","repos_url":"https://api.github.com/users/lvca/repos","events_url":"https://api.github.com/users/lvca/events{/privacy}","received_events_url":"https://api.github.com/users/lvca/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":91,"state":"closed","created_at":"2015-01-12T18:52:04Z","updated_at":"2015-01-14T16:21:11Z","due_on":null,"closed_at":"2015-01-12T23:45:31Z"},"comments":7,"created_at":"2014-12-21T16:10:28Z","updated_at":"2015-01-28T16:27:07Z","closed_at":"2014-12-30T16:11:44Z","body":"Hi, \r\n\r\nI'm using OrientDB as a new data store for an existing application. I frequently (1) query for one or more ODocument objects, (2) convert the objects to an alternate representation expected by a legacy API, (3) pass the converted objects to the legacy API and get new objects with changes, and (4) synthesize new ODocument objects to write back to the store. \r\n\r\nWhen I synthesize the ODocument objects, I use setIdentity and setVersion to ensure that OrientDB correctly updates the objects I was working with, so they're stored using the old RIDs and new version numbers. Otherwise I'd wind up with copies, where each update would create a new RID. \r\n\r\nAll of this was fine with OrientDB 1.7.* but no longer works with 2.0-rc1. The ORecordAbstract.setIdentity and ORecordAbstract.setVersion methods are now protected and my codebase basically breaks. \r\n\r\nI'd appreciate if the methods could be made public again, or if not, then there should be a workaround for the case I have described, where OrientDB-backed objects have to be processed by libraries with APIs that take something other than e.g. ODocument & friends. \r\n"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/71865077","html_url":"https://github.com/orientechnologies/orientdb/issues/3254#issuecomment-71865077","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3254","id":71865077,"user":{"login":"stebbi","id":498148,"avatar_url":"https://avatars.githubusercontent.com/u/498148?v=3","gravatar_id":"","url":"https://api.github.com/users/stebbi","html_url":"https://github.com/stebbi","followers_url":"https://api.github.com/users/stebbi/followers","following_url":"https://api.github.com/users/stebbi/following{/other_user}","gists_url":"https://api.github.com/users/stebbi/gists{/gist_id}","starred_url":"https://api.github.com/users/stebbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stebbi/subscriptions","organizations_url":"https://api.github.com/users/stebbi/orgs","repos_url":"https://api.github.com/users/stebbi/repos","events_url":"https://api.github.com/users/stebbi/events{/privacy}","received_events_url":"https://api.github.com/users/stebbi/received_events","type":"User","site_admin":false},"created_at":"2015-01-28T16:27:07Z","updated_at":"2015-01-28T16:27:07Z","body":"This is basically the same scenario I was working with - I think exactly\r\nthe same, from the OrientDB API viewpoint.\r\n\r\nOn Tuesday, January 27, 2015, buzzkillington <notifications@github.com>\r\nwrote:\r\n\r\n> I don't understand why there shouldn't be API support for fully\r\n> constructing ODocuments, including the version, as the OP described.\r\n> Consider the use case of a web-based API built on top of OrientDB, in which\r\n> multiple clients are retrieving/updating objects (which include a\r\n> serialized version number). If an update is received through the API,\r\n> shouldn't it be possible to use Orient's version checking by setting the\r\n> version on an ODocument constructed to represent that update (to ensure\r\n> that it's not based on an old version, and potentially overwriting new\r\n> data)?\r\n>\r\n> —\r\n> Reply to this email directly or view it on GitHub\r\n> <https://github.com/orientechnologies/orientdb/issues/3254#issuecomment-71693576>\r\n> .\r\n>"}}