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

Remove multiple fields in the same Update query

Open SchroterQuentin opened this issue 8 years ago • 1 comments

I try to remove multiple fields in a document in one Query. I use the SDK to do it :

OSqlUpdate update = database.Update().Record(doc.ORID);
foreach (var item in ToRemove)
{
    update.Remove(item);
}
update.Run();

Orient.Client.OException: com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on parsing command: Found unexpected keyword 'ATTRIBUT' while it was expected '[=, WHERE, SET, ADD, REMOVE, ....

The problem seems to be that the query which was created is the following

UPDATE #9:5 SET ID = 1011, toto = True, MORID = #9:1 REMOVE OnMaster, Attribut

while it should be

UPDATE #9:5 SET ID = 1011, toto = True, MORID = #9:1 REMOVE OnMaster REMOVE Attribut

Am I right or I made a mistake ?

SchroterQuentin avatar Jun 20 '17 13:06 SchroterQuentin

please share me the code for oreintdb 2.2.33 database connection through c#.net

user33 avatar Sep 18 '18 03:09 user33