0
votes

I've created 2 new entities, and when running command 'php app/console doctrine:schema:update --dump-sql' I get the message 'Nothing to update - your database is already in sync with the current entity metadata.'

I've tried clearing cache, and removing contents of the doctrine folder for orm, which was a couple of suggestions on this forum. Still no joy. I'm using APC cache settings on my config are as below.

# Doctrine Configuration
doctrine:
 dbal:
    driver:   "%database_driver%"
    host:     "%database_host%"
    port:     "%database_port%"
    dbname:   "%database_name%"
    user:     "%database_user%"
    password: "%database_password%"
    charset:  UTF8



orm:
    auto_generate_proxy_classes: "%kernel.debug%"
    auto_mapping: true
    metadata_cache_driver: apc
    result_cache_driver: apc
    query_cache_driver: apc
1
Have you registered the bundle with the new entities in AppKernel.php? - lxg
What happens with the validate command? - Tomas Votruba
[Mapping] OK - The mapping files are correct. [Database] OK - The database schema is in sync with the mapping files. - GAV
Are you sure you cleaned cache and executed your update command with the right env=? attribute? - so, depending on your environment you have to set this: app/console cache:clear --env=prod (just as an example for prod) - LBA
Another common problem is trying to mix mapping formats(annotations and yml). Make sure you have the expected files under Resources/config/doctrine. - Cerad

1 Answers

5
votes

May be this sounds idiotic but i cant comment so i will say it here, Can we see at least one of your entities? may be you have the wrong annotations.
Like forgetting to write

/** * @ORM\Table() * @ORM\Entity */

Personally i use

php app/console generate:doctrine:entity

to make sure all the basics annotations get included