I'm playing around with the pyorient driver and I've encountered a "I must be doing it wrong" problem.
Consider this sample code:
orient_client.db_open( "database", "admin", "admin" )
record = orient_client.query("select from V where some_field = 'some value'")[0]
cluster_id = parse_cluster_id(record._rid)
cluster_position = parse_cluster_position(record._rid)
record.oRecordData["some_field"] = "some other value"
orient_client.record_update(cluster_id, cluster_position, record)
When I run this code the field is updated correctly, however the IN/OUT edges get mangled. This is because the deserialization of binary data in the query result stores the edges as OrientBinaryObject (base64 strings). When the record_update() is written, the edge collections are stomped with these strings.
How do I read, update, write without tripping over the missing ridbag handling in pyorient?
i think this is a bug, i will investigate, thanks for reporting it.
I suggest for the moment to use SQL queries instead of CRUD methods if you have ridbag concerns.
I'm playing around with the pyorient driver and I've encountered a "I must be doing it wrong" problem. Consider this sample code:
orient_client.db_open( "database", "admin", "admin" ) record = orient_client.query("select from V where some_field = 'some value'")[0] cluster_id = parse_cluster_id(record._rid) cluster_position = parse_cluster_position(record._rid) record.oRecordData["some_field"] = "some other value" orient_client.record_update(cluster_id, cluster_position, record)
When I run this code the field is updated correctly, however the IN/OUT edges get mangled. This is because the deserialization of binary data in the query result stores the edges as OrientBinaryObject (base64 strings). When the record_update() is written, the edge collections are stomped with these strings.
How do I read, update, write without tripping over the missing ridbag handling in pyorient?