# Wie kann ich product children nehmen?

**URL:** <https://forum.shopware.com/t/wie-kann-ich-product-children-nehmen/66061>\
**Category:** Programmierung\
**Created:** [5. April 2020 um 15:54 UTC](https://forum.shopware.com/t/wie-kann-ich-product-children-nehmen/66061 "2020-04-05T15:54:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brtsos](https://avatars.discourse-cdn.com/v4/letter/b/8e8cbc/32.png) [@brtsos](https://forum.shopware.com/u/brtsos)\
**Post date:** [5. April 2020 um 15:54 UTC](https://forum.shopware.com/t/wie-kann-ich-product-children-nehmen/66061/1 "2020-04-05T15:54:19Z")

</div>

Hallo,

wie kann ich products children nehmen? Ich habe in meine Definition:

```
            new ManyToOneAssociationField(
                'products',
                'product_id',
                ProductDefinition::class,
                'id',
                true
            ),

```

Aber children in ProductEntity ist null.

```
 childCount stimmt - 8.

```

Danke 🙂

---

<div class="post-metadata">

**Author:** ![brtsos](https://avatars.discourse-cdn.com/v4/letter/b/8e8cbc/32.png) [@brtsos](https://forum.shopware.com/u/brtsos)\
**Post date:** [6. April 2020 um 07:51 UTC](https://forum.shopware.com/t/wie-kann-ich-product-children-nehmen/66061/2 "2020-04-06T07:51:57Z")

</div>

Ich weiss schon. Man kann es per Criteria nehmen:

```
$criteria->addAssociation('products.children');

```

&nbsp;
