Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If look at the <a href="http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/annotations-reference.html#annref-joincolumn" rel="nofollow">documentation</a> of <code>@JoinColumn</code></p> <p><em>This annotation is <strong>used in the context of relations in @ManyToOne, @OneToOne fields</strong> and <strong>in the Context of @JoinTable nested inside a @ManyToMany</strong>. This annotation is not required. If its not specified the attributes name and referencedColumnName are inferred from the table and primary key names.</em></p> <p>So as you are using <code>ManyToOne</code> relation your relation definition would be,</p> <pre><code>/** * @var Users * * @ORM\ManyToOne(targetEntity="Users") * @ORM\JoinColumn(name="useridx", referencedColumnName="idx") */ private $useridx; </code></pre> <p><b>Edit: </b></p> <p>If you want to get datas from user side then you have to create <a href="http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/association-mapping.html#one-to-many-bidirectional" rel="nofollow">OneToMany</a> relation. e.g</p> <p>In Datas.php</p> <pre><code>/** * @var Users * * @ORM\ManyToOne(targetEntity="Users", inversedBy = "datas") * @ORM\JoinColumn(name="useridx", referencedColumnName="idx") */ private $useridx; </code></pre> <p>And in Users.php add following line,</p> <pre><code>/** * @ORM\OneToMany(targetEntity="Datas", mappedBy="useridx", cascade={"persist"}) */ protected $datas; </code></pre> <p>And then do a <code>doctrine:generate:entities</code> command. To do operations on relation check <a href="http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/working-with-associations.html" rel="nofollow">this</a> doc entry.</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.
 

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