Replies: 3 comments 17 replies
-
Hard to say what is going on based on the information given. Also doesn't look like Symfony issue, more like Doctrine. |
Beta Was this translation helpful? Give feedback.
-
Looking at CriteriaController::edit() function, it seems you forgot to persist before flushing.
|
Beta Was this translation helpful? Give feedback.
-
As @javaDeveloperKid suggested, I started (trying) to debug with xdebug. Accessing my app root page, early before coming to my breakpoint, I stumble on an error in |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Symfony version(s) affected
6.2.11
Description
I'm working on a massive project with five databases; Since it is a rewriting I had to start from existing (very very badly designed) databases and "connect" Doctrine to them. This project was created in Symfony 7.4 then upgraded to 6.2.11, using Rector to fix the +700 files in my src directory.
After upgrading I created a basic controller. In one of this controller's method I receive a form in order to update an entity. I receive data from the request, I can fetch the entity and udate it, but database is not updated and no exception is raised. I also tried creating a brand new entity instance and it works, new data are persisted in database; moreover I can successfully update this newly created entity.
I checked Symfony profiler, the entity is well mapped, connections and entity manager are OK.
I suspected troubles with PHP attributes (perhaps missing or incorrect ones) but not quite sure of it. Then I thought about Doctrine misconfiguration but as there is not problem reading databases, I'm not sure either.
Does anybody have a clue of what is going wrong ?
Thanks a lot for any help.
Alex
How to reproduce
Possible Solution
No response
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions