# Uncaught Error: Call to undefined method Shopware\\Models\\Attribute\\Customer::setCustomer()

**URL:** <https://forum.shopware.com/t/uncaught-error-call-to-undefined-method-shopware-models-attribute-customer-setcustomer/62180>\
**Category:** Allgemein\
**Created:** [7. Oktober 2019 um 08:33 UTC](https://forum.shopware.com/t/uncaught-error-call-to-undefined-method-shopware-models-attribute-customer-setcustomer/62180 "2019-10-07T08:33:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![livaro2014](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@livaro2014](https://forum.shopware.com/u/livaro2014)\
**Post date:** [7. Oktober 2019 um 08:33 UTC](https://forum.shopware.com/t/uncaught-error-call-to-undefined-method-shopware-models-attribute-customer-setcustomer/62180/1 "2019-10-07T08:33:01Z")

</div>

Hi,

ich bekomme seit Shopware 5.6 diesen Fehler, wenn sich ein Kunde registrieren will:

**Fatal error** : Uncaught Error: Call to undefined method Shopware\Models\Attribute\Customer::setCustomer() in /var/www/clients/client4104/web8273/web/engine/Shopware/Components/Model/ModelEntity.php:108 Stack trace: #0 /var/www/clients/client4104/web8273/web/engine/Shopware/Models/Customer/Customer.php(1038): Shopware\Components\Model\ModelEntity-\>setOneToOne(Object(Shopware\Models\Attribute\Customer), ‘Shopware\Models…’, ‘attribute’, ‘customer’) #1 /var/www/clients/client4104/web8273/web/vendor/symfony/property-access/PropertyAccessor.php(551): Shopware\Models\Customer\Customer-\>setAttribute(Object(Shopware\Models\Attribute\Customer)) #2 /var/www/clients/client4104/web8273/web/vendor/symfony/property-access/PropertyAccessor.php(114): Symfony\Component\PropertyAccess\PropertyAccessor-\>writeProperty(Array, Object(Symfony\Component\PropertyAccess\PropertyPath), Object(Shopware\Models\Attribute\Customer)) #3 /var/www/clients/client4104/web8273/web/vendor/symfony/form/Extension/Core/DataMapper/PropertyPathMapper.php(86): Symf in&nbsp; **/var/www/clients/client4104/web8273/web/engine/Shopware/Components/Model/ModelEntity.php** &nbsp;on line&nbsp; **108**

**Was bedeutet das?**

**Aktuell ist Shopware 5.6.2 und PHP7.2 installiert**

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [7. Oktober 2019 um 08:40 UTC](https://forum.shopware.com/t/uncaught-error-call-to-undefined-method-shopware-models-attribute-customer-setcustomer/62180/2 "2019-10-07T08:40:18Z")

</div>

Hey,&nbsp;

das klingt so als würde dir ein Foreign Key fehlen. Kannst du einmal die Reparatur ausführen?

---

<div class="post-metadata">

**Author:** ![livaro2014](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@livaro2014](https://forum.shopware.com/u/livaro2014)\
**Post date:** [7. Oktober 2019 um 08:50 UTC](https://forum.shopware.com/t/uncaught-error-call-to-undefined-method-shopware-models-attribute-customer-setcustomer/62180/3 "2019-10-07T08:50:10Z")

</div>

Welche Reparatur?

---

<div class="post-metadata">

**Author:** ![livaro2014](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@livaro2014](https://forum.shopware.com/u/livaro2014)\
**Post date:** [7. Oktober 2019 um 08:51 UTC](https://forum.shopware.com/t/uncaught-error-call-to-undefined-method-shopware-models-attribute-customer-setcustomer/62180/4 "2019-10-07T08:51:55Z")

</div>

ahh gerade gefunden in den docs, ich teste

---

<div class="post-metadata">

**Author:** ![livaro2014](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@livaro2014](https://forum.shopware.com/u/livaro2014)\
**Post date:** [7. Oktober 2019 um 08:53 UTC](https://forum.shopware.com/t/uncaught-error-call-to-undefined-method-shopware-models-attribute-customer-setcustomer/62180/5 "2019-10-07T08:53:14Z")

</div>

hmm habe jetzt den Download&nbsp;[Download Foreign Keys ab Shopware 5.6.2](https://s3.eu-central-1.amazonaws.com/wiki-assets.shopware.com/1570019416/repairForeignKeys_5.6.2.zip)&nbsp;gemacht und in die Datenbank importiert.

Fehler ist aber immer noch

---

<div class="post-metadata">

**Author:** ![livaro2014](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@livaro2014](https://forum.shopware.com/u/livaro2014)\
**Post date:** [7. Oktober 2019 um 09:18 UTC](https://forum.shopware.com/t/uncaught-error-call-to-undefined-method-shopware-models-attribute-customer-setcustomer/62180/6 "2019-10-07T09:18:47Z")

</div>

kann ich die Tabelle s\_customer eventuell komplett leeren und irgendwie neu einspielen, in der Hoffnung das es dann wieder geht?

---

<div class="post-metadata">

**Author:** ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)\
**Post date:** [7. Oktober 2019 um 09:25 UTC](https://forum.shopware.com/t/uncaught-error-call-to-undefined-method-shopware-models-attribute-customer-setcustomer/62180/7 "2019-10-07T09:25:03Z")

</div>

Hast du denn Punkt 5 aus der Doku auch gemacht? Sonst ändert sich auch nach der Reparatur nichts:

> 1. Lösche&nbsp;nun via FTP den Cache, indem Du den Ordner „production\_xxxx“ (x = Datum des verwendeten Builds) im Ordner „var/cache“ löschst.

---

<div class="post-metadata">

**Author:** ![livaro2014](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@livaro2014](https://forum.shopware.com/u/livaro2014)\
**Post date:** [7. Oktober 2019 um 09:51 UTC](https://forum.shopware.com/t/uncaught-error-call-to-undefined-method-shopware-models-attribute-customer-setcustomer/62180/8 "2019-10-07T09:51:33Z")

</div>

ohhh das wars!

Vielen DANK!
