Skip to content

docstore/memdocstore query for nested documents with slices does not work #3506

@eqinox76

Description

@eqinox76

Describe the bug

Documents like

docmap{
	"goals": []any{
		docmap{"id": "1145755"},
		docmap{"id": "8336474"},
		docmap{"id": "1474479"},
	},
}

are not found by the following query:

collection.Query().Where("goals.id", "=", "1145755")

This is working fine when using docstore/mongodocstore.

To Reproduce

I forked this repository and added a unit test to show the issue eqinox76/go-cloud@7f3ef04.

Expected behavior

Find the document.

Version

v0.39.0

Additional context

eqinox76/go-cloud@7f3ef04 contains a potential fix. If it looks good to you i could make a pr.

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