Doctrine cannot update database #10779
Unanswered
arsrobota
asked this question in
Support Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Doctrine version(s) affected
2.5.12
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 generate their entities using reverse engineering. This project was created in Symfony 7.4 then upgraded to 6.2.11, using Rector to convertannotations to attributes.
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
EDIT: I really suspect a problem with the fact that generated annotations have been converted to attributes. I'm adding rector config.
How to reproduce
Possible Solution
No response
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions