0
votes

I'm learning how to use the php framework symfony 1.4, I'm on the model usage learning. I've write the model in the schema.yml, and I've run the following commands :

php symfony doctrine:build model which create the model's .class.php files, but i've look on my MySQL database manager and notice that, the database has been create but it still empty. Tables were not created automatically.

So when I try to deal with my datebase, I get exceptions like :

SQLSTATE[42S02]: Base table or view not found: 1146 table 'parlonsaffaires.blog_article' doesn't exists

Can someone help me ?

thanks to any reply

2

2 Answers

2
votes

You might have other classes already cached which could cause that error. Try running php symfony cc to clear the cache, then try building the database again using php symfony doctrine:build --all (I don't think php symfony doctrine:build model will work in Symfony 1.4 - make sure you're following the latest version of the Jobeet tutorial).

3
votes

Use php symfony doctrine:build --all to build models, SQL and database.

(Also, use php symfony help doctrine:build to see more info about the doctrine:build task.)