dllweb2016-04-27 19:33:24
dllweb, 2016-04-27 19:33:24

A bug or my mistake in the new version of symfony 3.0.0?

Good time to all, I have the following question, installed the latest version of symfony, the bundle is configured according to the Annotation principle.
I create an entity in the starting console
$ php console doctrine:generate:entity
. We get into the "section" of creating an entity. Next, it is proposed to enter the name of the bundle where we will create the Entity entity. Well, I don’t have entities all in one folder, I put everything in subfolders. The next generation command
$ BlogBundle:Blog\Post
Well, after this command, we prescribe the fields and their options, this is not the point.
After all that has been done, entities are generated and in the folder according to this example Entity/Blog/Post.php there is such an entry in the annotation
* ORM\Table(name="Blog\Post")
In this case, if you return to the console and run command
$ php console doctrine:schema:update --force
An exception and error codes are thrown in the console indicating that it is not possible to create a table named '\Post' CREATE TABLE
What am I doing wrong or is this a bug?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
mistergonza, 2016-04-27

does not support specifying the table name, and sets the default value (everything that comes after the bundle name), you will have to manually write the table names in each entity.
It's not even a bug, it's just a missing feature.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question