Skip to content

wrong resolution of deep query if selector matches the field too and order in query is unfortunate #7

Open
@Jamesgt

Description

@Jamesgt

If you have a reference to an other type, eg: User and you query:
{ "?boss": { "?.*": "" }, "?.*": "" }
then in the result you get:
{ "boss": 15, "name": "John Doe" }

but if you do this way:
{ "?.*": "", "?boss": { "?.*": "" } }
you get:
{ "boss": { "name": "Jane Doe" }, "name": "John Doe" }

The problem is that in the outer object key enumeration, the .* selector matches also the reference type and simply overwrites the already found deep value with the reference number.

Possible solution is to mark the keys that are already added to the result.

Workaround until it is fixed: as you see above, sort the field queries, so the less specific should be at the beginning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions