Skip to content

Saved record is not present after saving #605

Open
@robbiemoore

Description

@robbiemoore

I've been debugging an issue around creating a parent, and then creating the child node.

The issue has been that I get a No query results for model [App\Models\ExampleModel] 957092 when I try to save the child node (this is the parent not existing). It turns out that after I create and save the parent, that the parent does not immediately exist (a simple select query cannot retrieve it). If I then wait until the record can be found (a few seconds) and then continue, it works fine.

We now have large trees (even after scoping them). Could there be something going on where it is slow to calculate the lft and rgt fields, and performInsert is completed before the row actually has been inserted?

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