From df4e70bfe43bb0506e178f5784d728c0f8ff2b67 Mon Sep 17 00:00:00 2001 From: Aaron Scherer Date: Sat, 29 Sep 2012 14:57:03 -0700 Subject: [PATCH] Added a note about oneToMany relationships Added a note about the oneToMany relationships in the Reversed Engineering section of the doctrine cookbook --- cookbook/doctrine/reverse_engineering.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cookbook/doctrine/reverse_engineering.rst b/cookbook/doctrine/reverse_engineering.rst index c81ecdaed08..7f5fac8dd7f 100644 --- a/cookbook/doctrine/reverse_engineering.rst +++ b/cookbook/doctrine/reverse_engineering.rst @@ -92,6 +92,13 @@ The generated ``BlogPost.dcm.xml`` metadata file looks as follows: +.. note:: + + If you have ``oneToMany`` relationships between your entities, + you will need to edit the generated ``xml`` or ``yml`` files to add + a section on the specific entities for ``oneToMany`` defining the + ``inversedBy`` and the ``mappedBy`` pieces. + Once the metadata files are generated, you can ask Doctrine to import the schema and build related entity classes by executing the following two commands.