Unfortunately not. I believe that query doesn't eagerly fetch any collections either?
This is really getting on my nerves. Two days without getting anywhere with something that should have been a rather simple thing?
To sum things up, i would like to get all
Orders that has
Items that has
Products that is of a certain product type. Additionally,
the items collection for each order should be eagerly fetched, along with the product that is associated with each item.
The SQL query which does just this would be:
Code:
SELECT * FROM order
LEFT JOIN order_item ON order_item.order_id = order.id
LEFT JOIN item ON item.id = order_item.item_id
LEFT JOIN product ON product.id = item.product_id
WHERE product.type IN (100, 500, 700)
AND order.id = '62899ed4-df9a-4b70-917b-4d5d7b674a93'