In my symfony2 application using doctrine2, I have an exception listener which logs any exception. If the exception is database related, if the entitymanager is closed, a new exception is raised in my exception listener, which is of course not good. i need to use another entity manager for logging.
So nowI'm trying to configure it and I get the following error :
The class 'AppBundle\Entity\User\User' was not found in the chain configured namespaces Payum\Core\Model, FOS\UserBundle\Model
500 Internal Server Error - MappingException
knowing that my current config is this :
doctrine:
orm:
auto_generate_proxy_classes: "%kernel.debug%"
default_entity_manager: default
entity_managers:
default:
auto_mapping: true
logging:
mappings:
AppBundle: ~
PayumBundle: ~
FOSUserBundle: ~
What should I configure the mapping under logging? I've read I can't use auto_mapping a secondtime, though I'd like to have the same result. How can I do ?
Thanks a lot!
EDIT : the output of s doctrine:mapping:info --em=logging work
> php.exe D:\Divers\Programmation\Web\foodmeup.dev\app\console doctrine:mapping:info --em=logging
Found 52 mapped entities:
[OK] AppBundle\Entity\Core\Journal
[OK] AppBundle\Entity\Core\Media
[OK] AppBundle\Entity\Core\NumberObject
[OK] AppBundle\Entity\Core\ObjectCategory
[OK] AppBundle\Entity\Core\Tag
[OK] AppBundle\Entity\Core\Vote
[OK] AppBundle\Entity\FoodAnalytics\Planning
[OK] AppBundle\Entity\FoodAnalytics\Recipe
[OK] AppBundle\Entity\FoodAnalytics\RecipeAsset
[OK] AppBundle\Entity\FoodAnalytics\RecipeIngredient
[OK] AppBundle\Entity\FoodAnalytics\RecipeStep
[OK] AppBundle\Entity\FoodAnalytics\RecipeSubrecipe
[OK] AppBundle\Entity\FoodAnalytics\Task
[OK] AppBundle\Entity\FoodAnalytics\Team
[OK] AppBundle\Entity\FoodAnalytics\Unit
[OK] AppBundle\Entity\FoodAnalytics\UserAsset
[OK] AppBundle\Entity\FoodAnalytics\UserIngredient
[OK] AppBundle\Entity\FoodAnalytics\UserIngredientSupplier
[OK] AppBundle\Entity\FoodAnalytics\UserRecipe
[OK] AppBundle\Entity\FoodAnalytics\UserSupplier
[OK] AppBundle\Entity\FoodAnalytics\Worker
[OK] AppBundle\Entity\Job\Application
[OK] AppBundle\Entity\Job\Availability
[OK] AppBundle\Entity\Job\ContractType
[OK] AppBundle\Entity\Job\Diploma
[OK] AppBundle\Entity\Job\Experience
[OK] AppBundle\Entity\Job\HierarchicalLevel
[OK] AppBundle\Entity\Job\JobSeeker
[OK] AppBundle\Entity\Job\Offer
[OK] AppBundle\Entity\Job\Position
[OK] AppBundle\Entity\Job\Skill
[OK] AppBundle\Entity\Job\Training
[OK] AppBundle\Entity\MarketPlace\Order
[OK] AppBundle\Entity\MarketPlace\OrderGroup
[OK] AppBundle\Entity\MarketPlace\OrderLine
[OK] AppBundle\Entity\MarketPlace\OrderMessage
[OK] AppBundle\Entity\MarketPlace\OrganizationProduct
[OK] AppBundle\Entity\MarketPlace\Payment
[OK] AppBundle\Entity\MarketPlace\PaymentToken
[OK] AppBundle\Entity\MarketPlace\Product
[OK] AppBundle\Entity\MarketPlace\Subscription
[OK] AppBundle\Entity\Social\Comment
[OK] AppBundle\Entity\Social\Post
[OK] AppBundle\Entity\User\Associate
[OK] AppBundle\Entity\User\Contact
[OK] AppBundle\Entity\User\Group
[OK] AppBundle\Entity\User\Notification
[OK] AppBundle\Entity\User\Organization
[OK] AppBundle\Entity\User\Role
[OK] AppBundle\Entity\User\User
[OK] AppBundle\Entity\User\UserCategory
[OK] AppBundle\Entity\User\UserNotification
Process finished with exit code 0 at 18:08:38.
Execution time: 5 659 ms.