Today I was working on a bundle for generating invoices. Since we have some kind of invoice functionality in many projects in the past, my goal was to create a nice reusable bundle.
So I started with creating an empty bundle and moved it to /vendor/bundles/Netvlies/Bundle/InvoiceBundle.
With the app/console I started generating a entity for persisting particular data for an invoice:
$ app/console doctrine:generate:entity
This is still all pretty straight forward… so to complete this difficult task I tried to create to update the schema:
$ app/console doctrine:schema:update --force Nothing to update - your database is already in sync with the current entity metadata.
Hmmz, wtf?
For some obvious reason it was ignoring my new bundle outside the src structure? After some little investigation I discovered you have to add it to your ORM mapping like this:
doctrine:
orm:
auto_generate_proxy_classes: %kernel.debug%
default_entity_manager: default
entity_managers:
default:
connection: default
mappings:
NetvliesSomeAppBundle: ~
# add it like this
NetvliesInvoiceBundle: ~
it is not working
Nothing to update – your database is already in sync with the current entity metadata.
Hi mile,
Can you provide your config.yml? What method do you use to map your entities, annotations or something else?