Closed Ziiweb closed 12 years ago
you are mixing the short syntax and the complete syntax for the ORM config. You should choose one of them only.
short syntax:
doctrine:
orm:
auto_generate_proxy_classes: %kernel.debug%
auto_mapping: true
mappings:
StofDoctrineExtensionsBundle: ~
expanded syntax:
doctrine:
orm:
auto_generate_proxy_classes: %kernel.debug%
entity_managers:
default:
auto_mapping: true
mappings:
StofDoctrineExtensionsBundle: ~
And btw, your config for the mapping is wrong. There is no entity in the bundle at all (and they would be catched by the auto_mapping otherwise anyway). What needs to be mapped are the entities of the extensions. See the related documentation
Thank you, i didn't know that expanded syntax!!!, good man!
Didn't know of the short <> complete syntax discrepancy either. Thank you!
Thanks for the solution though i have not asked this questions but i have also faced this questions :)
I have a quick related question: While using multiple entity managers, a config like this:
entity_managers:
default:
connection: connection_1
auto_mapping: true
second_em:
connection: connection_2
mappings:
FooBarBundle: ~
will allow FooBarBundle
to be in the connection_2
while the others Bundles in the app will be mapped by the default
entity manager with connection_1
?
TIA
Using this config and SYmfony 2.7
orm:
auto_generate_proxy_classes: "%kernel.debug%"
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
dql:
datetime_functions:
month: DoctrineExtensions\Query\Mysql\Month
year: DoctrineExtensions\Query\Mysql\Year
I have an error : Attempted to load class "Month" from namespace "DoctrineExtensions\Query\Mysql". Did you forget a "use" statement for another namespace?
I tried to add a use statement in my reposotory... If anyone as an idea ?
Same issue... I have an error : Attempted to load class "Month" from namespace "DoctrineExtensions\Query\Mysql". Did you forget a "use" statement for another namespace?
@BigWenceslas These classes don't belong to this bundle, nor to the Gedmo extensions. So this is the wrong place to report this.
Hi,
after following the instructions to install this bundle, Im getting this error:
I found other issues related to this problem but i did not find a solution..
This is my config.yml:
and this below is my composer.phar: Javi