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

Issues with nested projection #803

Open
ykoer opened this issue Jul 21, 2017 · 0 comments
Open

Issues with nested projection #803

ykoer opened this issue Jul 21, 2017 · 0 comments

Comments

@ykoer
Copy link
Contributor

ykoer commented Jul 21, 2017

I have an array projection in containerVendor to containerRepository, which has a query on containerImage

POST /rest/data/find/containerVendor
"projection": [
        {
            "field": "repositories",
            "include": true,
            "match": "$and": [
                {
                     "field": "published",
                     "op": "=",
                     "rvalue": true
            	},
                {
                     "field": "images.*.published",
                     "op": "=",
                     "rvalue": true
            	}
            ],
            "projection": {
                "field": "repository",
                "include": true,
                "recursive": true
            }
        }
    ],

Lightblue throws following exception:
rest/FindCommand/containerVendor/find(containerVendor:null)/images\",\"errorCode\":\"metadata:InvalidFieldReference\",\"msg\":\"images in images.*.repositories.*.published\"}

The error message is also misleading:
It should be something like:
containerVendor.repositories->containerRepository.images->containerImage.repositories.published

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant