Inconsistent behaviour in relation manager dependency injection
Hi, why is it that if I use dependency injection in a relationship manager table row, sometimes the model is loaded with the related relationship records and sometimes not?
For example, in a scenario where
Inside the
The output is something like this:
How come that
I tested it with and without
Am I missing something?
For example, in a scenario where
Foo has a one-to-many relationship with Bar via the bars() relationship.Inside the
BarsRelationManager of the FooResource I have the following code:The output is something like this:
How come that
$ownerFromLivewire which uses the $livewire property to get the owner record successfully retrieves the relation records, while $owner which explicitly loads the relationship and $ownerRecord which does not both do not retrieve the relation records?I tested it with and without
Model::preventLazyLoading() and both return the same results.Am I missing something?