# Foreign Keys?

**URL:** <https://forum.shopware.com/t/foreign-keys/46542>\
**Category:** Installation/Einstieg\
**Created:** [26. Juni 2017 um 22:40 UTC](https://forum.shopware.com/t/foreign-keys/46542 "2017-06-26T22:40:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [26. Juni 2017 um 22:40 UTC](https://forum.shopware.com/t/foreign-keys/46542/1 "2017-06-26T22:40:54Z")

</div>

Moin. Habe eine Entwicklungsumgebung eingerichtet um Updates durchzuspielen 5.1.2 auf 5.2.26 sowie PHP Updates. Dazu habe ich die Datenbank 1:1 kopiert, den Pfad in s\_core\_shops angepasst. Caches gelöscht. In das Backend komme ich ohne Probleme, jedoch bekomme ich im Frontend den Fehler:&nbsp; **No mapping found for field ‚customerGroup‘ on class ‚Shopware\Models\Attribute\CustomerGroup‘ .** &nbsp;Kurze Suche und ich komme zur Foreign Keys Reparatur-Anleitung. Script in phpMyAdmin importiert bekomme ich jedoch den SQL Fehler:&nbsp;**#1452 - Cannot add or update a child row: a foreign key constraint fails (`DATENBANKNAME`.`#sql-WTF`, CONSTRAINT `#sql-WTF2` FOREIGN KEY (`orderID`)&nbsp;**.Doch hierzu gibt es keine SQL Befehle wie man das behebt, nur zu **basketID** , **categoryID** und **articleID.** &nbsp;Hat jemand eine Idee?

Danke und Gruss

---

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [26. Juni 2017 um 23:08 UTC](https://forum.shopware.com/t/foreign-keys/46542/2 "2017-06-26T23:08:40Z")

</div>

Ok, also nachdem der Cache nun nochmals in der Console und anschliessend im Backend gelöscht wurde, funktionert alles.&nbsp;
