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

I can't properly read a catalog with nested resources, #279

Open
W1nstar opened this issue May 19, 2020 · 0 comments
Open

I can't properly read a catalog with nested resources, #279

W1nstar opened this issue May 19, 2020 · 0 comments

Comments

@W1nstar
Copy link

W1nstar commented May 19, 2020

After debugging the whole read process, I'm finding some things that I don't really understand.

My backend offers a catalog with multiple nested tables and it's relationships. The catalog parse works as expected, assigning relationships.

There's a parent table that has a few other children tables:

table 1: [
    field1,
    field2,
    table2: [
        field1,
        table3: [
            field 1, field 2
        ]
    ]
]

When it comes to read operation, server is responding with all the expected data, but there's this line:

        // Check if we should return this table with its nested child table's data as nested
        else if (this._jsdo._nestChildren) {
            data = this._getDataWithNestedChildren(this._data);
        }
        else {
            data = this._getRelatedData();
        }

The property _nestChildren is never true. Process goes to getRelatedData function, and there it simply ends returning the _data property, wich doesn't contain the nested table's records.

The _nestChildren property is only set to true in the _getDataObjectAsNested function, but this function is never called.

So what's happening here? Am I asking the JSDO something it can't do? Because we were told it could.

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