DDC-961: First letters are missing in M:N tables #1201

Closed
opened 2026-01-22 13:05:50 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Dec 30, 2010).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user vrana:

When I define M:N relation and update the schema by SchemaTool then the joining table is created without first letters (e.g. rticle*ag instead of article*tag). Relevant part from the source code:

<?php
/*** @entity **/
class Article {
    /*** @manyToMany(targetEntity="Tag") **/
    public $tags;
}

/*** @entity **/
class Tag {
    /*** @manyToMany(targetEntity="Article", mappedBy="tags") **/
    public $articles;
}

$tool = new \Doctrine\ORM\Tools\SchemaTool($em);
$tool->updateSchema(array(
    $em->getClassMetadata('Article'),
    $em->getClassMetadata('Tag'),
));
?>

You can download the complete example at http://www.notorm.com/static/doctrine2-notorm/

Originally created by @doctrinebot on GitHub (Dec 30, 2010). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user vrana: When I define M:N relation and update the schema by SchemaTool then the joining table is created without first letters (e.g. `rticle*ag` instead of `article*tag`). Relevant part from the source code: ``` html <?php /*** @entity **/ class Article { /*** @manyToMany(targetEntity="Tag") **/ public $tags; } /*** @entity **/ class Tag { /*** @manyToMany(targetEntity="Article", mappedBy="tags") **/ public $articles; } $tool = new \Doctrine\ORM\Tools\SchemaTool($em); $tool->updateSchema(array( $em->getClassMetadata('Article'), $em->getClassMetadata('Tag'), )); ?> ``` You can download the complete example at http://www.notorm.com/static/doctrine2-notorm/
admin added the Bug label 2026-01-22 13:05:50 +01:00
admin closed this issue 2026-01-22 13:05:50 +01:00
Author
Owner

@doctrinebot commented on GitHub (Dec 30, 2010):

Comment created by @beberlei:

Your entities are not namespaced are they?

@doctrinebot commented on GitHub (Dec 30, 2010): Comment created by @beberlei: Your entities are not namespaced are they?
Author
Owner

@doctrinebot commented on GitHub (Dec 30, 2010):

Comment created by @beberlei:

Yes, this is related to entities in global namespaces only. That is why nobody realized it before.

Fixed now.

@doctrinebot commented on GitHub (Dec 30, 2010): Comment created by @beberlei: Yes, this is related to entities in global namespaces only. That is why nobody realized it before. Fixed now.
Author
Owner

@doctrinebot commented on GitHub (Dec 30, 2010):

Issue was closed with resolution "Fixed"

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

No dependencies set.

Reference: doctrine/archived-orm#1201