Skip to content

Driver fails to delete the last subdocument in a collection of subdocuments on a parent document. #19

Description

@vogelrh

When subdocuments are added to a property (on the parent) containing a collection of these subdocuments, and then these subdocuments are removed from the parent,the tungus driver fails to remove the last document in the collection.
I tracked the bug down to line 101 in the updater.js module in the applyPull method. It appears that the obj parameter needs to be passed into the "matcher" function "as-is", not wrapped in another object.

The applyPull method only appears to be called when the last subdocument is deleted. All other subdocument deletions are handled by the applySet method.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions