Replies: 1 comment
-
To use the standard element relational eager loading of products/purchasables, we would need to make line items elements, which will not be happening in the short-term. The hard part about this is also that purchasable can be of multiple element types, which would be hard to eager load without knowing the type up front (store it on the line item?). Leaving the ticket open as a feature request. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What are you trying to do?
Something like this has the potential to create a high number of queries. Especially if you're getting multiple orders
A few other items are being added to allow for eager loading for records related to an order, but this would be something that's related to a relation of an order.
Luke explains it way better than I could here: #1603 (comment)
What's your proposed solution?
Perhaps
withLineItems()
can take an arg of what it can eager load? Something likewithLineItems(['purchasable', 'purchasable.product', 'purchasable.product.featuredImage'])
Additional context
Originally chatted about here: #1603
Beta Was this translation helpful? Give feedback.
All reactions