Encountering Error with Doctrine: "Doctrine\ORM\ORMInvalidArgumentException: A new entity was found through the relationship". #58730
Unanswered
thienhuynhtps
asked this question in
Q&A
Replies: 1 comment
-
Hey, how's going ? I'm also facing this problem, but mine is a bit strange because this error only happens during automated E2E ( Cypress ) tests. During manual regression tests everything works. Have you found the solution ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. Can anyone help me ?
#Overview:
I am currently writing a feature for users to create shops.
After a user creates a shop, it will require admin approval. The admin will then review and approve it.
A shop contains various information and allows image uploads.
#Environment:
#Flow Code:
When the admin approves, the information will be transferred from the temporary table to the main table.
#Issues:
The previous code was functioning normally for a long time and has not had any related updates.
However, today an error has occurred, affecting all shops when approval.
#Error message:
One notable point is that shops without uploaded images are still encountering this error.
#Code Causing the Error:
#Things I Tried to Fix:
=> When I added it, the save operation was successful, but now there are two identical records saved in the database.
I had to switch to deleting using QueryBuilder.
$this->deleteShopImages($Shop);
At this point, I still don’t understand the cause.
I suspect that it might be due to my system rebuilding every time code is updated through CI/CD, and each build reinstalls Composer.
Could it be that some Doctrine library packages have been updated, leading to this issue?
Could everyone provide me with some suggestions for what to check? Thank you!
Beta Was this translation helpful? Give feedback.
All reactions