Skip to content

parent eager loading failure #365

Open
@laurentbaig

Description

@laurentbaig

Hi, eager loading of parent seems to work in tinker but when I use in a Controller method

        $categories = Category::with([
            'parent', 'exam',
        ])->get();

I do not receive the parent model back in the loaded categories.

I tried to run the tests and got

There was 1 failure:

1) ScopedNodeTest::testDescendants
Failed asserting that 0 matches expected 1.

/Users/admin/Sites/forest/vendor/kalnoy/nestedset/tests/ScopedNodeTest.php:106

FAILURES!
Tests: 74, Assertions: 199, Failures: 1.

I'm using PHP 7.1.25 and laravel/framework 5.7.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions