# The target-entity Shopware\\Models\\Attribute\\Shop cannot be found in 'Shopware\\Models\\Shop\\Shop

**URL:** <https://forum.shopware.com/t/the-target-entity-shopware-models-attribute-shop-cannot-be-found-in-shopware-models-shop-shop/58815>\
**Category:** Programmierung\
**Created:** [28. März 2019 um 12:31 UTC](https://forum.shopware.com/t/the-target-entity-shopware-models-attribute-shop-cannot-be-found-in-shopware-models-shop-shop/58815 "2019-03-28T12:31:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maha](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@Maha](https://forum.shopware.com/u/Maha)\
**Post date:** [28. März 2019 um 12:31 UTC](https://forum.shopware.com/t/the-target-entity-shopware-models-attribute-shop-cannot-be-found-in-shopware-models-shop-shop/58815/1 "2019-03-28T12:31:59Z")

</div>

Hallo Nach Shopware Update 5.5.7 bekommen ich diese Fehlermeldung wenn ich sw:generate:attributes ausführe:

&nbsp;The target-entity Shopware\Models\Attribute\Shop cannot be found in ‘Shopware\Models\Shop\Shop#attribute’. &nbsp; &nbsp;&nbsp;

hat jemand eine Idee?

Vielen Dank!

---

<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:** [28. März 2019 um 12:47 UTC](https://forum.shopware.com/t/the-target-entity-shopware-models-attribute-shop-cannot-be-found-in-shopware-models-shop-shop/58815/2 "2019-03-28T12:47:42Z")

</div>

Einmal den Cache löschen, dann sollte es gehen.

---

<div class="post-metadata">

**Author:** ![zuernBernhard](https://avatars.discourse-cdn.com/v4/letter/z/a88e57/32.png) [@zuernBernhard](https://forum.shopware.com/u/zuernBernhard)\
**Post date:** [12. August 2019 um 12:53 UTC](https://forum.shopware.com/t/the-target-entity-shopware-models-attribute-shop-cannot-be-found-in-shopware-models-shop-shop/58815/3 "2019-08-12T12:53:55Z")

</div>

Nein - löst das Problem hier nicht.

---

<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:** [12. August 2019 um 12:57 UTC](https://forum.shopware.com/t/the-target-entity-shopware-models-attribute-shop-cannot-be-found-in-shopware-models-shop-shop/58815/4 "2019-08-12T12:57:39Z")

</div>

Glaube @Shyim‍ meint nicht im Backend \> Shopcache leeren, sondern auf dem Server diekt den Ordner /var/cache/production\_… löschen.

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [12. August 2019 um 13:01 UTC](https://forum.shopware.com/t/the-target-entity-shopware-models-attribute-shop-cannot-be-found-in-shopware-models-shop-shop/58815/5 "2019-08-12T13:01:02Z")

</div>

Kürzlich hatte ich einen ähnlichen Fehler bei einem Kunden. Am Ende fehlte eine Datenbank Tabelle für Attribute. Vielleicht mal mit einem originalen 5.5.7 Shop vergleichen. Nur so eine Idee!

---

<div class="post-metadata">

**Author:** ![mbdesign](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/mbdesign/32/14160_2.png) [@mbdesign](https://forum.shopware.com/u/mbdesign)\
**Post date:** [31. Dezember 2019 um 01:14 UTC](https://forum.shopware.com/t/the-target-entity-shopware-models-attribute-shop-cannot-be-found-in-shopware-models-shop-shop/58815/6 "2019-12-31T01:14:27Z")

</div>

Ich hatte das Problem auch und nach langem suchen und einer Neuinstallation auf dem Testsystem um die Tabellen&nbsp;vergleichen habe ich etwas gefunden in der s\_core\_shops\_attributes Tabelle.

Es fehlte der&nbsp;Constraint Eintrag zur&nbsp;s\_core\_shops Tabelle.&nbsp;  
Keine Ahnung wie das passiert ist???

&nbsp;

Nach dem ersetllen der Tabelle mit:

```
--
-- Table structure for table `s_core_shops_attributes`
--

DROP TABLE IF EXISTS `s_core_shops_attributes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `s_core_shops_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `shopID` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `shopID` (`shopID`),
  CONSTRAINT `FK__s_core_shops` FOREIGN KEY (`shopID`) REFERENCES `s_core_shops` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `s_core_shops_attributes`
--

LOCK TABLES `s_core_shops_attributes` WRITE;
/*!40000 ALTER TABLE `s_core_shops_attributes` DISABLE KEYS */;
/*!40000 ALTER TABLE `s_core_shops_attributes` ENABLE KEYS */;
UNLOCK TABLES;

```

&nbsp;

Und&nbsp;Ordner /var/cache/production\_… löschen&nbsp; läuft wieder alles.

&nbsp;

&nbsp;
