mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Support to revert inversedBy/mappedBy in JoinColumn to add foreign key to "mapped" table (OneToOne association) #7505
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 @WinterSilence on GitHub (May 21, 2025).
Feature Request
What
Support to revert inversedBy/mappedBy in JoinColumn to add foreign key to "mapped" table (OneToOne association).
Why
Real case: I have
meta_datatable related toproducts,categoriesand etc. with FK like asIn this case, if I remove product/category, then also remove attached record in
meta_data.But I can't create same FK by Doctrine, because FK adds to
productsand I can't change this behavior.How
Switch inversedBy/mappedBy to add foreign key to
meta_datatable, insteadproducts: