mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Reverse engineer only detects many to one relationships on the many side #4986
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @victoriousgaming on GitHub (Jan 25, 2016).
Hello
When you do a reverse engineer the getters and setters are not made for the "one" side of a manyToOne relationship.
This has been an issue for our developers, but I did not see a ticket about it already on github. We have fixed this problem by modifying our Doctrine code base with code we found in stackexchange (not my favorite solution as we use composer to check out the doctrine code).
Here is the article we used to fix our code base (includes the code needed to patch the bug).
http://stackoverflow.com/questions/15474121/symfony2-doctrine2-generate-one-to-many-annotation-from-existing-database-by-d
All the best
Will Ferrer
@backbone87 commented on GitHub (Jan 26, 2016):
From my understanding the "generate entities from DB schema" is more like a "nice-to-have" feature, that should not be used to create "production ready" entites. Manual adjustments on the generated entities and their mappings are expected.
I dont think that this issue classifies as a bug, but is more likely a feature request or improvement.
In my opinion this issue will not or should not be treated with high priority by the devs unless you provide a comprehensive and complete PR with test cases (not just throwing in a SO link).
@victoriousgaming commented on GitHub (Jan 26, 2016):
This is not currently a blocker for us, my intention was to bring the matter to the developers attention to help improve the project. I am not stressing urgency to resolve the issue and while it seems like a bug to me it could be viewed as an improvement.
I will add a ticket to our backlog to create a PR with test cases as time permits.
Best
Will