{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4342","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4342/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4342/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4342/events","html_url":"https://github.com/orientechnologies/orientdb/issues/4342","id":86978116,"number":4342,"title":"RID to String conversion","user":{"login":"aleks-n","id":8292681,"avatar_url":"https://avatars.githubusercontent.com/u/8292681?v=3","gravatar_id":"","url":"https://api.github.com/users/aleks-n","html_url":"https://github.com/aleks-n","followers_url":"https://api.github.com/users/aleks-n/followers","following_url":"https://api.github.com/users/aleks-n/following{/other_user}","gists_url":"https://api.github.com/users/aleks-n/gists{/gist_id}","starred_url":"https://api.github.com/users/aleks-n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleks-n/subscriptions","organizations_url":"https://api.github.com/users/aleks-n/orgs","repos_url":"https://api.github.com/users/aleks-n/repos","events_url":"https://api.github.com/users/aleks-n/events{/privacy}","received_events_url":"https://api.github.com/users/aleks-n/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-10T13:49:59Z","updated_at":"2015-06-12T13:19:03Z","closed_at":null,"body":"Hi all, \n\nCould you please suggest a proper way to convert RID of existing Vertex to String? \nGetting following error message: \n\"java.lang.IllegalArgumentException: Argument '?' is not a RecordId in form of string. Format must be: <cluster-id>:<cluster-position> [ONetworkProtocolHttpDb]\". \n\nCode:\n\nvar cmdCreateRel = \"create edge Child from ? to (select from Site where code='\" + code +\"')\";\nprint(\"3:::cmdCreateRel: \" + cmdCreateRel);\nvar cityRidAsString = \"\" + cities[ci].getRecord().field('@rid');\nprint(\"3:::c rid: \" + cityRidAsString);\ngdb.command(\"sql\", cmdCreateRel, [cityRidAsString]);\n\nServer console:\n\n3:::\n3:::cmdCreateRel: create edge Child from ? to (select from Site where code='County-0_City-99_Site-0')\n3:::c rid: #15:2001\n\n2015-06-10 09:19:15:309 SEVERE Internal server error:\njava.lang.IllegalArgumentException: Argument '?' is not a RecordId in form of string. Format must be: <cluster-id>:<cluster-position> [ONetworkProtocolHttpDb]\n\n===============\nBut following statement works in Studio:\n\ncreate edge Child from #15:2001 to (select from Site where code='County-0_City-99_Site-0')\n\n\n"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/111489847","html_url":"https://github.com/orientechnologies/orientdb/issues/4342#issuecomment-111489847","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4342","id":111489847,"user":{"login":"aleks-n","id":8292681,"avatar_url":"https://avatars.githubusercontent.com/u/8292681?v=3","gravatar_id":"","url":"https://api.github.com/users/aleks-n","html_url":"https://github.com/aleks-n","followers_url":"https://api.github.com/users/aleks-n/followers","following_url":"https://api.github.com/users/aleks-n/following{/other_user}","gists_url":"https://api.github.com/users/aleks-n/gists{/gist_id}","starred_url":"https://api.github.com/users/aleks-n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleks-n/subscriptions","organizations_url":"https://api.github.com/users/aleks-n/orgs","repos_url":"https://api.github.com/users/aleks-n/repos","events_url":"https://api.github.com/users/aleks-n/events{/privacy}","received_events_url":"https://api.github.com/users/aleks-n/received_events","type":"User","site_admin":false},"created_at":"2015-06-12T13:19:03Z","updated_at":"2015-06-12T13:19:03Z","body":"Hi, \n\nIt is 2.0.10 Community Edition for Windows (orientdb-community-2.0.10.zip). And following test code works fine. \n\nfor (var i = firstFloorNumber; i < runNum; i++){\n\tvar floorName = \"Floor-\" + i;\n\tvar floorCode = buildingCode + \"_\" + floorName;\n\tvar cmdCreateFloor = \"create vertex Floor set name=?, code=?\";\n\tvar floor = gdb.command(\"sql\", cmdCreateFloor, [floorName, floorCode]);\n}"}}