In my system all products can have 1 tag assigned to them out of a list of tags. Orders can only have products in them that all have the same specific tag in common.
I want to retrieve all orders based on the tag that the products hold, but right now i have to do that like this:
Firstly I'm retrieving the productid's of all products with the tag. Then i get all orders and filter based on the first order line having a product with that specific tag.
It would be great if the tag information gets included in the order lines so that i can do this directly. Is there any better way to do this perhaps? Because my solution is not very efficient or fast.
In my system all products can have 1 tag assigned to them out of a list of tags. Orders can only have products in them that all have the same specific tag in common.
I want to retrieve all orders based on the tag that the products hold, but right now i have to do that like this: Firstly I'm retrieving the productid's of all products with the tag. Then i get all orders and filter based on the first order line having a product with that specific tag.
It would be great if the tag information gets included in the order lines so that i can do this directly. Is there any better way to do this perhaps? Because my solution is not very efficient or fast.