DDC-1222: Composite Primary Key is not recognized #1534

Closed
opened 2026-01-22 13:17:14 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Jun 21, 2011).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user johannes:

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.

Originally created by @doctrinebot on GitHub (Jun 21, 2011). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user johannes: 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.
admin added the Bug label 2026-01-22 13:17:14 +01:00
admin closed this issue 2026-01-22 13:17:15 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jun 21, 2011):

Comment created by johannes:

Fixed in D 2.1

@doctrinebot commented on GitHub (Jun 21, 2011): Comment created by johannes: Fixed in D 2.1
Author
Owner

@doctrinebot commented on GitHub (Jun 21, 2011):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Jun 21, 2011): Issue was closed with resolution "Invalid"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1534