Reverse engineer only detects many to one relationships on the many side #4986

Open
opened 2026-01-22 14:55:41 +01:00 by admin · 2 comments
Owner

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

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
Author
Owner

@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).

@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).
Author
Owner

@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

@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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4986