Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2136

convert-mapping can't create YML from Annotation when Id column is a OneToOne relationship

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4
    • Component/s: ORM
    • Labels:
    • Environment:
      Symfony 2.1.3

      Description

      I have two entities

      /**

      • @ORM\Entity
        */
        class User { /** * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") * @ORM\Column(type="integer") */ private $id }

      /**

      • @ORM\Entity
        */
        class UserData { /** * @ORM\Id * @ORM\OneToOne(targetEntity="User") */ private $id }

      When I convert these with symfony's

      doctrine:mapping:convert yml test/

      it generates an entity definition for UserData without any id fields, which, of course, cannot be imported to the database, as the new entity doesn't have an identifier column.

        Activity

        Hide
        Benjamin Eberlei added a comment -

        Fixed in 2.4

        Show
        Benjamin Eberlei added a comment - Fixed in 2.4

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Gergely Polonkai
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: