Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You only need to specify a <code>mappedBy</code> attribute when there is a bidirectional relationship to determine which side is the owning side.</p> <p>From the docs:</p> <p><a href="http://docs.doctrine-project.org/en/2.0.x/reference/association-mapping.html#owning-side-and-inverse-side" rel="nofollow">http://docs.doctrine-project.org/en/2.0.x/reference/association-mapping.html#owning-side-and-inverse-side</a> </p> <blockquote> <ul> <li>A bidirectional relationship has both an owning side and an inverse side.</li> <li>A unidirectional relationship only has an owning side.</li> <li>The owning side of a relationship determines the updates to the relationship in the database.</li> </ul> <p>...</p> <p>The following rules apply to bidirectional associations:</p> <p>The inverse side of a bidirectional relationship must refer to its owning side by use of the mappedBy attribute of the OneToOne, OneToMany, or ManyToMany mapping declaration. The mappedBy attribute designates the field in the entity that is the owner of the relationship.</p> </blockquote> <p>In your case you only have unidirectional relationship which means you don't have to specify <code>mappedBy</code>, you may be able to leave it out.</p> <hr> <p>Or you can add supplier to the Address class:</p> <pre><code>/** * @ManyToOne(targetEntity="Supplier", inversedBy="addresses") */ private $supplier; </code></pre> <p>which then allows you to set <code>mappedBy="supplier"</code> in <code>Supplier.php</code></p> <pre><code>/** * @OneToMany(targetEntity="Address", mappedBy="supplier", cascade={"persist", "remove"}) */ private $addresses; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload