Uploaded image for project: '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
    • Status: Resolved
    • Priority: 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

        gergelypolonkai Gergely Polonkai created issue -
        Hide
        beberlei Benjamin Eberlei added a comment -

        Fixed in 2.4

        Show
        beberlei Benjamin Eberlei added a comment - Fixed in 2.4
        beberlei Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.4 [ 10321 ]
        Resolution Fixed [ 1 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={expand=changesets[0:20].revisions[0:29],reviews, query=DDC-2136}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

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

            Dates

            • Created:
              Updated:
              Resolved: