Fetching products by category slug using the Doctrine "Tree" extension

198 views Asked by At

I currently have Product and Category entities, with a many-to-one relationship through the product's category property. The category has a slug defined using the @Gedmo\Slug annotation, which is working perfectly.

Unfortunately the Tree extension's documentation on Github is fairly brief when it comes to slugs, especially selecting by them. I've tried quite a number of Google results but haven't been able to find a solution yet.

What I'd like to know is, how I can fetch all products that are within a given category slug, or within a child category of that slug?

Can anybody help please?

0

There are 0 answers