# Fehler in Dokumentation

**URL:** <https://forum.shopware.com/t/fehler-in-dokumentation/89188>\
**Category:** Shopware 6 (German)\
**Created:** [16. Juli 2021 um 11:16 UTC](https://forum.shopware.com/t/fehler-in-dokumentation/89188 "2021-07-16T11:16:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KaleAndMe](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@KaleAndMe](https://forum.shopware.com/u/KaleAndMe)\
**Post date:** [16. Juli 2021 um 11:16 UTC](https://forum.shopware.com/t/fehler-in-dokumentation/89188/1 "2021-07-16T11:16:36Z")

</div>

Moin,

in der Doku [https://developer.shopware.com/docs/guides/plugins/plugins/framework/data-handling/add-complex-data-to-existing-entities](https://developer.shopware.com/docs/guides/plugins/plugins/framework/data-handling/add-complex-data-to-existing-entities) wird im vorletzten Abschnitt folgendes gemacht:

`$productEntity->addExtension('custom_string', new ArrayEntity(['foo' => 'bar']));`

So gern ich das auch können würde, lässt „addExtension“ nur noch Structs des Typs Shopware\Core\Framework\Struct\Struct zu.

Bitte einmal anpassen 🙂

---

<div class="post-metadata">

**Author:** ![KaleAndMe](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@KaleAndMe](https://forum.shopware.com/u/KaleAndMe)\
**Post date:** [19. Juli 2021 um 07:32 UTC](https://forum.shopware.com/t/fehler-in-dokumentation/89188/2 "2021-07-19T07:32:28Z")

</div>

Korrektur:  
mit „new ArrayEntity()“ wird ein Array Struct erzeugt der auch mit addExtension genutzt werden kann. Ich hatte nur einen normalen Array erstellt.
