Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1222

Composite Primary Key is not recognized

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: 2.1
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      I have the following mapping:

      class TopicTranslation
      {
          /**
      * @ORM\Id
      * @ORM\ManyToOne(targetEntity="Topic")
      */
          private $topic;
      
          /**
      * @ORM\Id
      * @ORM\Column(type="string", length=5)
      */
          private $locale;
      }
      

      Doctrine will only use "locale" as primary key for the table. I would expect it to use "topic_id" and "locale" instead.

        Activity

        Hide
        Johannes Schmitt added a comment -

        Fixed in D 2.1

        Show
        Johannes Schmitt added a comment - Fixed in D 2.1

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Johannes Schmitt
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: