# Datenbank Fehler API

**URL:** https://forum.shopware.com/t/datenbank-fehler-api/105402
**Category:** Shopware 6 (German)
**Created:** [2. Oktober 2024 um 13:03 UTC](https://forum.shopware.com/t/datenbank-fehler-api/105402 "2024-10-02T13:03:41Z")
**Posts on this page:** 4
**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: [2. Oktober 2024 um 13:03 UTC](https://forum.shopware.com/t/datenbank-fehler-api/105402/1 "2024-10-02T13:03:41Z")

</div>

Wie bekomme ich mehr Details aus dieser Fehlermeldung? Ich würde gern wissen WELCHE id hier doppelt/nicht existend ist? Generell wie kann ich DB fehler anzeigen lassen? Monolog.yaml anpassen hat nicht gereicht.  
APP\_ENV=prod oder dev macht keinen Unterschied

` request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException: "An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`dxxxxx`.`product\_property`, CONSTRAINT `fk.product\_property.configuration\_option\_id` FOREIGN KEY (`property\_group\_option\_id`) REFERENCES `property\_group\_option` (`id`) ON DELETE CASCADE ON )" at ExceptionConverter.php line 56`

EDIT es ist ein product upsert aufruf

---

<div class="post-metadata">

### Author: ![Teddie](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/teddie/32/26013_2.png) [@Teddie](https://forum.shopware.com/u/Teddie)
#### Post date: [3. Oktober 2024 um 10:16 UTC](https://forum.shopware.com/t/datenbank-fehler-api/105402/2 "2024-10-03T10:16:40Z")

</div>

Wahrscheinlich gar nicht ohne die jeweiligen Dateien zu manipulieren.

Wie händelst du das Anlegen der Eigenschaften?

---

<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: [3. Oktober 2024 um 11:19 UTC](https://forum.shopware.com/t/datenbank-fehler-api/105402/3 "2024-10-03T11:19:43Z")

</div>

Das mache ich in zwei Schritten.  
Ich habe ein Script welches erst alle Eigenschaften anlegt mit eigenen IDs.  
Anschliessen mache in eine Batchverarbeitung (upsert) für Produkte und gebe diese OptionIds mit.

---

<div class="post-metadata">

### Author: ![Teddie](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/teddie/32/26013_2.png) [@Teddie](https://forum.shopware.com/u/Teddie)
#### Post date: [3. Oktober 2024 um 13:53 UTC](https://forum.shopware.com/t/datenbank-fehler-api/105402/4 "2024-10-03T13:53:44Z")

</div>

… aber eine scheint zu fehlen.

Lass doch die Produkte einzeln verarbeiten, dann weißt du welches Produkt es ist und kannst die Eigenschaften prüfen.
