Hi Martin,
AFAIK the revision number for version checking should not be specified as
the third parameter to update()
db.testi.update("123", { city: "XYZ"},"1083175598030")
but as part of the search value:
db.testi.update({ _key: "123", _rev:"1083175598030", { city: "XYZ"})
That should trigger a conflict should the actual revision number differ.
I think the third parameter to update() can be used to provide extra
options, but is not used for revision number checking.
Best regards
Jan
Am Freitag, 19. August 2016 15:20:43 UTC+2 schrieb Martin Kuhn:
>
> Also a simple test with arangosh really confuses me:
>
> In the following sequence, the last update should bring an error
>
> db.testi.save({_key: "123", city: "ABC"})
> result:
> {
> "_id" : "testi/123",
> "_key" : "123",
> "_rev" : "1083175598030"
> }
>
> db.testi.update("123", { city: "CDEF"})
> result:
> {
> "_id" : "testi/123",
> "_key" : "123",
> "_rev" : "1083175598070",
> "_oldRev" : "1083175598030"
> }
>
> // here I try an update with an outdated rev -> this should not be
> successfull, right?
> db.testi.update("123", { city: "XYZ"},"1083175598030")
> result:
> {
> "_id" : "testi/123",
> "_key" : "123",
> "_rev" : "1083175598101",
> "_oldRev" : "1083175598070"
> }
>
--
You received this message because you are subscribed to the Google Groups
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.