1
0
mirror of synced 2025-03-05 20:36:15 +03:00

Fix Getting Started.

This commit is contained in:
Benjamin Eberlei 2011-02-26 11:12:58 +01:00
parent c8c4c4ed46
commit aab2303c37

View File

@ -455,7 +455,7 @@ We then go on specifying the definition of a Bug:
/** /**
* @ManyToMany(targetEntity="Product") * @ManyToMany(targetEntity="Product")
*/ */
private $products = null; // Set private for encapsulation private $products;
} }
.. code-block:: xml .. code-block:: xml
@ -521,14 +521,13 @@ After the field definitions the two qualified references to the
user entity are defined. They are created by the ``many-to-one`` user entity are defined. They are created by the ``many-to-one``
tag. The class name of the related entity has to be specified with tag. The class name of the related entity has to be specified with
the ``target-entity`` attribute, which is enough information for the ``target-entity`` attribute, which is enough information for
the database mapper to access the foreign-table. The the database mapper to access the foreign-table. Since
``join-column`` tags are used to specify how the foreign and
referenced columns are named, an information Doctrine needs to
construct joins between those two entities correctly. Since
``reporter`` and ``engineer`` are on the owning side of a ``reporter`` and ``engineer`` are on the owning side of a
bi-directional relation we also have to specify the ``inversed-by`` bi-directional relation we also have to specify the ``inversed-by``
attribute. They have to point to the field names on the inverse attribute. They have to point to the field names on the inverse
side of the relationship. side of the relationship. We will see in the next example that the ``inversed-by``
attribute has a counterpart ``mapped-by`` which makes that
the inverse side.
The last missing property is the ``Bug::$products`` collection. It The last missing property is the ``Bug::$products`` collection. It
holds all products where the specific bug is occurring in. Again holds all products where the specific bug is occurring in. Again