Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Assumptions ...</strong></p> <p>No, you don't need to declare them anywhere else than in your Entity directory. </p> <ul> <li><p>What's the error message you got?</p></li> <li><p>I guess you added </p> <p>use Doctrine\ORM\Mapping as ORM;</p></li> </ul> <p>on the top of your classes to let them be mapped.</p> <p><strong>I tried ...</strong></p> <p>I tried to generate your entities by adding a simple Contact &amp; Conference entities and it's working fine. Here are the code snippets:</p> <p><strong>Contact_Conference_Invitation.php</strong></p> <pre><code>namespace Ahsio\StackBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity */ class Contact_Conference_Invitation { /** * @ORM\Id * @ORM\ManyToOne(targetEntity="Ahsio\StackBundle\Entity\Contact") */ private $contact; /** * @ORM\Id * @ORM\ManyToOne(targetEntity="Ahsio\StackBundle\Entity\Conference") */ private $conference; /** * @var datetime dateInvitation * * @ORM\Column(name="dateInvitation", type="datetime") */ private $dateInvitation; //Getters and setters } </code></pre> <p><strong>Contact.php</strong></p> <pre><code>namespace Ahsio\StackBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity */ class Contact { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @param $id */ public function setId($id) { $this-&gt;id = $id; } /** * Get id * * @return integer */ public function getId() { return $this-&gt;id; } } </code></pre> <p><strong>Conference.php</strong></p> <pre><code>namespace Ahsio\StackBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity */ class Conference { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @param $id */ public function setId($id) { $this-&gt;id = $id; } /** * Get id * * @return integer */ public function getId() { return $this-&gt;id; } } </code></pre> <p>Here are the generated tables:</p> <p><img src="https://i.stack.imgur.com/cRAK5.jpg" alt="enter image description here"></p> <p>NB: I used a specific namespace for the entities generation to work fine, you need to change them.</p>
    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.
    3. VO
      singulars
      1. This table or related slice is empty.
    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