Skip to content

Duplicates filter in EagerLoadIterator removes valid paths #39

Closed
@tantchen

Description

@tantchen

At this point i have ["station","aircraft","aircraftConfig","person","owner"] in $values because aircraft starts with aircraftConfig the reject callback removes aircraft.

The expected output should be ["aircraft","aircraftConfig","owner","person","station"]
but it is ["aircraftConfig","owner","person","station"] with the result that every aircraft will be fetched with a singe select.

fn($path) => $values->contains(fn($check) => $path !== $check && Str::startsWith($check, $path))

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions