0 votes

Received by email:

hi, i think i found another bug:
when adding an association that's also a pk, i get two properties generated

/** 
 * @ORM\Entity
 */
class PersonHasPerson

{
    /** 
     * @ORM\Id
     * @ORM\Column(type="integer")
     */
    private $first_person_id;


    /** 
     * @ORM\Id
     * @ORM\Column(type="integer")
     */
    private $second_person_id;


    /** 
     * @ORM\Id
     * @ORM\Column(type="integer")
     */
    private $type;

    /** 
     * @ORM\ManyToOne(targetEntity="Person")
     * @ORM\JoinColumn(name="first_person_id", referencedColumnName="id", nullable=false)
     */
    private $PersonFirst;

    /** 
     * @ORM\ManyToOne(targetEntity="Person")
     * @ORM\JoinColumn(name="second_person_id", referencedColumnName="id", nullable=false)
     */
    private $PersonSecond;
}

should be

/** 
 * @ORM\Entity
 */
class PersonHasPerson

{
    /** 
     * @ORM\Id
     * @ORM\Column(type="integer")
     */
    private $type;

    /** 
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity="Person")
     * @ORM\JoinColumn(name="first_person_id", referencedColumnName="id", nullable=false)
     */
    private $PersonFirst;

    /** 
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity="Person")
     * @ORM\JoinColumn(name="second_person_id", referencedColumnName="id", nullable=false)
     */
    private $PersonSecond;
}
in Solved by Skipper developer (137k points)

1 Answer

0 votes
Best answer

Fixed. This fix will be available in upcoming 2.2.0 version

by Skipper developer (137k points)
selected by