Skip to content

ReplaceDocuments does an Update (PATCH) instead of a Replace (PUT) #644

Closed
@Kafkalasch

Description

@Kafkalasch

When trying to replace documents (note the plural, it does work with ReplaceDocument correctly), the v2 version of the arangodriver has a bug and does an Update (that merges changes) instead of a replace.

You can see the error in collection_documents_replace_impl.go in line 100:

func (c collectionDocumentReplace) ReplaceDocumentsWithOptions(ctx context.Context, documents interface{}, opts *CollectionDocumentReplaceOptions) (CollectionDocumentReplaceResponseReader, error) {
// ...
req, err := c.collection.connection().NewRequest(http.MethodPatch, url) // <-- THIS SHOULD BE A http.MethodPut
// ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions