DDC-755: Length of String column in a many to many bi-directional is 255 chars #933

Closed
opened 2026-01-22 12:56:01 +01:00 by admin · 4 comments
Owner

Originally created by @doctrinebot on GitHub (Aug 18, 2010).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user omega:

As per discussion with Guilherme, I'm opening a ticket for when a bi-directional many to many relationship is established with one side having a string as its primary key, and the other having an integer.

It appears as though the ORM/DBAL are getting confused as to what the length of the invisible join table column between them should be.

In the case of my example models, when I use SchemaTool to generate the tables, it creates a BlogPost table with the column blog_name with a length of 255 characters (it should be 40). When I use the SchemaTool to generate an update to the table, it tells me it wants to modify the column to be 255 characters in spite the facts that:

  1. It already is.
  2. It's wrong.
Originally created by @doctrinebot on GitHub (Aug 18, 2010). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user omega: As per discussion with Guilherme, I'm opening a ticket for when a bi-directional many to many relationship is established with one side having a string as its primary key, and the other having an integer. It appears as though the ORM/DBAL are getting confused as to what the length of the invisible join table column between them should be. In the case of my example models, when I use SchemaTool to generate the tables, it creates a BlogPost table with the column blog_name with a length of 255 characters (it should be 40). When I use the SchemaTool to generate an update to the table, it tells me it wants to modify the column to be 255 characters in spite the facts that: 1) It already is. 2) It's wrong.
admin added the Bug label 2026-01-22 12:56:02 +01:00
admin closed this issue 2026-01-22 12:56:02 +01:00
Author
Owner
@doctrinebot commented on GitHub (Aug 18, 2010): - duplicates [DDC-761: Associations between string fields result in mismatched column definitions on owning side](http://www.doctrine-project.org/jira/browse/DDC-761)
Author
Owner

@doctrinebot commented on GitHub (Sep 12, 2010):

Comment created by @beberlei:

This issue is a duplicate of DDC-761

@doctrinebot commented on GitHub (Sep 12, 2010): Comment created by @beberlei: This issue is a duplicate of [DDC-761](http://www.doctrine-project.org/jira/browse/DDC-761)
Author
Owner

@doctrinebot commented on GitHub (Sep 12, 2010):

Issue was closed with resolution "Duplicate"

@doctrinebot commented on GitHub (Sep 12, 2010): Issue was closed with resolution "Duplicate"
Author
Owner

@doctrinebot commented on GitHub (Dec 13, 2015):

Imported 1 attachments from Jira into https://gist.github.com/0f14984153002077643a

@doctrinebot commented on GitHub (Dec 13, 2015): Imported 1 attachments from Jira into https://gist.github.com/0f14984153002077643a - [10745_Models.php](https://gist.github.com/0f14984153002077643a#file-10745_Models-php)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#933