Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query with @type does not support filtering on collections #7281

Closed
nirinchev opened this issue Jan 23, 2024 · 2 comments
Closed

Query with @type does not support filtering on collections #7281

nirinchev opened this issue Jan 23, 2024 · 2 comments
Assignees

Comments

@nirinchev
Copy link
Member

When trying to run a query like oneAny[2].@type == 'dictionary' (where oneAny is a mixed property) - i.e. find all objects where oneAny contains a list where the type of the 3rd element is a dictionary, I get the following exception:

Unable to parse the type attribute string 'dictionary', supported case insensitive values are: [null, int, integer, int16, int32, int64, short, long, byte, char, bool, boolean, string, binary, data, bytearray, byte[], date, datetimeoffset, timestamp, float, double, decimal128, decimal, object, link, objectid, uuid, guid, numeric, bindata]. Error code: 3015.

This seems to imply there's no way to filter on the type for the newly introduced collections.

@jedelbo
Copy link
Contributor

jedelbo commented Jan 24, 2024

I think I will go with the type names 'object' and 'array' as that seems to be more in line with the BSON vocabulary. This is kind of a breaking change as links will not have the type 'objectlink'.

@jedelbo
Copy link
Contributor

jedelbo commented Jan 26, 2024

Fixed by #7288

@jedelbo jedelbo closed this as completed Jan 26, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants