私は2つのエンティティとのOneToMany Relationshipを持っています:
1 つArticle
は を持ち、Brand
1 つBrand
は多数を持ちArticles
ます。私の Twig テンプレートで、Articles
それぞれ5 つしか表示できないのはBrand
なぜですか?
軽いクエリでそれを行うベストプラクティスは何ですか?
以下、私のコード:
{% for brand in colBrands %}
{% for article in brand.articles %}
<!-- Display only 5 results and stop -->
{% endfor %}
{% endfor %}