Closed szJony closed 3 years ago
Would you please add support for optimistic locking using the _rev attribute? Based on my tests, it can be achieved by:
Possible solution for (1):
diff --git a/Core.Arango/Modules/Internal/ArangoDocumentModule.cs b/Core.Arango/Modules/Internal/ArangoDocumentModule.cs --- a/Core.Arango/Modules/Internal/ArangoDocumentModule.cs (date 1617716910120) +++ b/Core.Arango/Modules/Internal/ArangoDocumentModule.cs (date 1617716910120) @@ -187,6 +187,8 @@ { var parameter = new Dictionary<string, string>(); + parameter.Add("ignoreRevs", "false"); + if (waitForSync.HasValue) parameter.Add("waitForSync", waitForSync.Value.ToString().ToLowerInvariant());
Possible solution for (2):
public abstract class BaseEntity : IBaseEntity { ... [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Revision { get; set; } ... }
Single / Multi Update and Replace done Multi Delete also Single Get and Delete maybe later (need Rev in If-Match header)
all done
Would you please add support for optimistic locking using the _rev attribute? Based on my tests, it can be achieved by:
Possible solution for (1):
Possible solution for (2):