Search code examples
symfonyormdoctrineapc

doctrine:schema:update --force does not work is it APC?


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

Solution

  • 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