Details
Description
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/
Activity
Benjamin Eberlei
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 2.0.1 [ 10114 ] | |
| Fix Version/s | 2.1 [ 10022 ] | |
| Resolution | Fixed [ 1 ] |
Benjamin Eberlei
made changes -
| Workflow | jira [ 12266 ] | jira-feedback [ 14713 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback [ 14713 ] | jira-feedback2 [ 16577 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback2 [ 16577 ] | jira-feedback3 [ 18830 ] |