Skip to content

Commit cdfaff3

Browse files
committed
minor symfony#10053 Explain another option to override bundle's entity mapping (javiereguiluz)
This PR was merged into the 2.8 branch. Discussion ---------- Explain another option to override bundle's entity mapping Fixes symfony#7076 ... but it needs validation from a Doctrine expert. Commits ------- a758b4f Explain another option to override bundle's entity mapping
2 parents 67b783c + a758b4f commit cdfaff3

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

bundles/override.rst

+8-5
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,14 @@ inside a :doc:`compiler pass </service_container/compiler_passes>`.
5555
Entities & Entity Mapping
5656
-------------------------
5757

58-
Due to the way Doctrine works, it is not possible to override entity mapping
59-
of a bundle. However, if a bundle provides a mapped superclass (such as the
60-
``User`` entity in the FOSUserBundle) one can override attributes and
61-
associations. Learn more about this feature and its limitations in
62-
`the Doctrine documentation`_.
58+
If a bundle defines its entity mapping in configuration files instead of
59+
annotations, you can override them as any other regular bundle configuration
60+
file. The only caveat is that you must override all those mapping configuration
61+
files and not just the ones you actually want to override.
62+
63+
If a bundle provides a mapped superclass (such as the ``User`` entity in the
64+
FOSUserBundle) you can override its attributes and associations. Learn more
65+
about this feature and its limitations in `the Doctrine documentation`_.
6366

6467
Forms
6568
-----

0 commit comments

Comments
 (0)