Symfony Form Using "_" In ID Field
For some reason, my generated pages are using for the field name article_id instead of articleid as it is in my database and model. I have tried running "symfony doctrine:build --all"
and "symfony doctrine:generate-module ..."
multiple times to no avail.
Here is an example of a bad generated file:
./apps/frontend/modules/article/templates/_form.php: <?php echo link_to('Delete', 'article/delete?article_id='.$form->getObject()->getArticleId()
Any suggestions would be greatly appreciated!
Thanks in advance!
EDIT
I tried cleaning as recommended, I also tried deleting the module and rebuilding it.
EDIT 2
After running "symfony doctrine:build --all" I do see this as a reference to the yml file used:
>> file+ /tmp/doctrine_schema_97369.yml
Here is the Article section from the /tmp yml file:
Article:
columns:
ArticleID:
type: integer
primary: true
开发者_如何学运维 autoincrement: true
length: '4'
It is possible that if you changed this name in your schema, that the old model files have kept the old name. You can try to clean your model files using the task doctrine:clean-model-files
精彩评论