Skip to content

Api Method "deleteItemsByTagsAll()" removes unrelated items #713

Closed
@di-rect

Description

@di-rect

When You add multiple items that have their own tag and also share a tag it seems that when you delete an item using deleteItemsByTagsAll(['sharedTag', 'ownTag']) that all items that share 'sharedTag' are also removed.

Following the docs it should only remove items that have multiple tags or all you set for this function, not one or more like deleteItemsByTags() does.

This happens for me on Couchbase buckets.

To Reproduce
Steps to reproduce the behavior:

  1. Save multiple items with a shared tag and their own tag (like ID)
  2. Remove one of the items by it's IDtag and the sharedTag using deleteItemsByTagsAll(['sharedTag', 'ownTag'])

So 10 items should be in total 21 => 10 items, 10 unique tags items, 1 shared tag item

Expected behavior
One item removed and one (unique) tag, so 2 items less in the bucket and the rest should stay

Current behavior
All items that share the shared tags are removed, so also are their individual tags.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions