DDC-2296: Naming Strategy ORM Entity - plural problem #2997

Closed
doctrinebot opened this Issue Feb 14, 2013 · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user keksnicoh:

We are using Doctringe since 2.2.2.

We the follow relation:

manyToMany:
categories:
targetEntity: \Application\Model\Db\Entity\Category
inversedBy: topics
joinTable:
name: finqtopiccategory
joinColumns:
topic_id:
referencedColumnName: id
inverseJoinColumns:
category_id:
referencedColumnName: id

As expected the generated methods in our entities were named like:

addCategory()
getCategories()
...

After we updated to 2.3.2 we got the follow method names:

addCategorie()
getCateogires()

I found in the changelog some notes like "changed naming strategy".
Took us several hours too find out that we had to downgrade back to
2.2.2. Is this a bug or "just" a new behavior?

@doctrinebot

Issue was closed with resolution "Can't Fix"

@doctrinebot

Comment created by @beberlei:

Its "just" a new behavior, sadly non BC. The EntityGenerator is really a mess in that regard, because its very hard to test as well. However all the methods are "protected", so you should be able to extend it with your custom entity generator and fixing it.

We are slowly deprecating the EntityGenerator, because this kind of problem and its huge monolithic structure makes it so hard to use and customize.

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment