Closed znittzel closed 4 years ago
Have the same problem, just for the other edge direction.
ErrorException in BelongsTo.php line 102:
Any ideas?
I became a part of Neo's Slack-channel and asked generally about using "with". I got a reply that "with" is not ment to work more than including a related model, like so Model::with('subModel')->get()
. Right now I'm going the long way of counting the objects in my code, which gives me an extra call to the db. Although, I saw while debugging in the neoEloquent that the framework itself is doing an extra call anyway when using "with" so maybe there's no better solution.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
When using Laravels "withCount" on a models relation it returns the error:
. Im not sure why this error is thrown in
when NeoEloquent has its own HasOneOrMany -class. Maybe i've set up the model incorrectly:
And the query