OrientDB-NET.binary icon indicating copy to clipboard operation
OrientDB-NET.binary copied to clipboard

Cannot update Binary field.

Open dmikov opened this issue 9 years ago • 0 comments

Following code generates exception in Response.cs during execution of last line.

        using (var database = new ODatabase("OrientDbPool"))
        {

            database.Create.Class("WithBinary").Extends("V").Run();
            database.Create.Property("name", OType.String).Property("value", OType.Binary).Class("WithBinary").Run();
            var test = new WithBinary() { name = "Test", value = new byte[] { 45, 32, 71 } };
            database.Create.Vertex("WithBinary").Set(test).Run();
            //test.value = new byte[] { 71, 1, 34 };
            database.Update(test).Class("WithBinary").Where("name").Equals("Test").Run();
        }

"com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.select from WithBinary WHERE name = 'Test' java.lang.IllegalArgumentException: Cannot parse binary as the same type as the value (class=java.util.ArrayList): [45, 32, 71] "

dmikov avatar Oct 20 '15 13:10 dmikov