You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Further inspection reveals that in the XHR request for /nova-api/ I can't alter the construction of the 'component' class to exclude all other relations (i.e. using a without() call in the nova-api/-request. Also It seems that this is where the issue stems from; both Component and 'Product' and the Pivot have even more releations that are N+1 Queried multiple times... Hence the massive increase in (duplicate) queries.
Any way I can hook into this (without sacrificing the '$with = []' in my models?
Please provide full reproducing repository based on fresh installation as suggested in the bug report template (or you can refer to https://github.com/nova-issues for example)
We're closing this issue because it's inactive, already solved, old, or not relevant anymore. Feel free to open up a new issue if you're still experiencing this problem.
Description:
We have a BelongsToMany relation which seems to do a lot of queries eventhough the original pivot is empty?
We have the following setup:
Model: Compontent
And in Nova we have:
When hitting the details page this incurs a
/nova-api/products?search
request with the following filter (shortened):This results in 14 queries of which 10 are duplicate?
(even though there were no relations)
If having 9 actual cook_products relations this balloons to 67 queries of which 7 where unique (!)
I'm not sure if this is a bug, a feature request or missing documentation. (or something else)
The text was updated successfully, but these errors were encountered: