-
-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Mass creation: creating an element with the same name as the parent causes an error 500
Saw that at least with footprints and categories, same elsewhere I think.
To Reproduce
See screenshots
Expected behavior
It works? It does if I use the normal add element instead
Server Side
- Part-DB Version: 2.2.1
- PHP Version: docker jbtronics/part-db1:latest
- Database Server: postgresql 18
Desktop (please complete the following information):
- OS: manjaro
- Browser: vivaldi (chrome based)
- Version: latest
Additional context
Traceback in container logs:
partdb | [2025-11-09T17:45:02.666123+00:00] request.CRITICAL: Uncaught PHP Exception Doctrine\ORM\ORMInvalidArgumentException: "A new entity was found through the relationship 'App\Entity\Parts\Footprint#children' that was not configured to cascade persist operations for entity: test. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example #[ORM\ManyToOne(..., cascade: ['persist'])]." at ORMInvalidArgumentException.php line 68 {"exception":"[object] (Doctrine\\ORM\\ORMInvalidArgumentException(code: 0): A new entity was found through the relationship 'App\\Entity\\Parts\\Footprint#children' that was not configured to cascade persist operations for entity: test. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example #[ORM\\ManyToOne(..., cascade: ['persist'])]. at /var/www/html/vendor/doctrine/orm/src/ORMI
partdb | nvalidArgumentException.php:68)
partdb | [stacktrace]
partdb | #0 /var/www/html/vendor/doctrine/orm/src/UnitOfWork.php(3189): Doctrine\\ORM\\ORMInvalidArgumentException::newEntitiesFoundThroughRelationships()
partdb | #1 /var/www/html/vendor/doctrine/orm/src/UnitOfWork.php(370): Doctrine\\ORM\\UnitOfWork->assertThatThereAreNoUnintentionallyNonPersistedAssociations()
partdb | #2 /var/www/html/vendor/doctrine/orm/src/EntityManager.php(268): Doctrine\\ORM\\UnitOfWork->commit()
partdb | #3 /var/www/html/src/Controller/AdminPages/BaseAdminController.php(372): Doctrine\\ORM\\EntityManager->flush()
partdb | #4 /var/www/html/src/Controller/AdminPages/FootprintController.php(70): App\\Controller\\AdminPages\\BaseAdminController->_new()
partdb | #5 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(183): App\\Controller\\AdminPages\\FootprintController->new()
partdb | #6 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw()
partdb | #7 /var/www/html/vendor/symfony/http-kernel/Kernel.php(182): Symfony\\Component\\HttpKernel\\HttpKernel->handle()
partdb | #8 /var/www/html/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php(35): Symfony\\Component\\HttpKernel\\Kernel->handle()
partdb | #9 /var/www/html/vendor/autoload_runtime.php(29): Symfony\\Component\\Runtime\\Runner\\Symfony\\HttpKernelRunner->run()
partdb | #10 /var/www/html/public/index.php(5): require_once('...')
partdb | #11 {main}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
