Skip to content

Issues with nested projection #803

@ykoer

Description

@ykoer

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

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