From a758b4f74674a680829f11ab4585131f553f2ae3 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 12 Jul 2018 16:41:36 +0200 Subject: [PATCH] Explain another option to override bundle's entity mapping --- bundles/override.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bundles/override.rst b/bundles/override.rst index 52950a29c3c..bfa0d1a769b 100644 --- a/bundles/override.rst +++ b/bundles/override.rst @@ -71,11 +71,14 @@ For more information on compiler passes, see :doc:`/service_container/compiler_p Entities & Entity Mapping ------------------------- -Due to the way Doctrine works, it is not possible to override entity mapping -of a bundle. However, if a bundle provides a mapped superclass (such as the -``User`` entity in the FOSUserBundle) one can override attributes and -associations. Learn more about this feature and its limitations in -`the Doctrine documentation`_. +If a bundle defines its entity mapping in configuration files instead of +annotations, you can override them as any other regular bundle configuration +file. The only caveat is that you must override all those mapping configuration +files and not just the ones you actually want to override. + +If a bundle provides a mapped superclass (such as the ``User`` entity in the +FOSUserBundle) you can override its attributes and associations. Learn more +about this feature and its limitations in `the Doctrine documentation`_. Forms -----