Skip to content

Embedded record expansion returns inconsistent cached results #12

@ghetzel

Description

@ghetzel

In the case where a schema definition contains multiple embedded record expansions pointing to the same table, but where each expansion exposes different fields to return, it is undefined which field set will be associated with each expanded field.

e.g.:

[{
    "name": "mycollection",
    "embed": [{
        "key":        "expand1",
        "collection": "other",
        "fields": [
            "name",
            "enabled"
        ]
    }, {
        "key":        "expand2",
        "collection": "other",
        "fields": [
            "name",
            "email",
            "password"
        ]
    },

    ...
}]

In the above case, it is undefined whether expand1 and expand2 will contain a record with the fields name and enabled; or fields name, email, and password. The values are seen to switch intermittently.

This is almost certainly a cache optimization gone wrong (e.g.: keying on just identity instead of indentity+fields).

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions