Ccdn_user_security (mappingexception)
Replies: 15   Views: 3641  Subscribers: 5

Posted by reece · 27-04-2013 - 15:11

Firstly, make sure your user bundle is setup correctly and works on its own without the SecurityBundle to ensure that its setup correctly.

Then make sure you are resolving the target entity interface listener (resolve_target_entities) using a similar configuration to this:

­
doctrine:
    dbal:
        driver:   "%database_driver%"
        host:     "%database_host%"
        port:     "%database_port%"
        dbname:   "%database_name%"
        user:     "%database_user%"
        password: "%database_password%"
        charset:  UTF8
    orm:
        default_entity_manager: default
        auto_generate_proxy_classes: "%kernel.debug%"
        #auto_mapping: true
        resolve_target_entities:
            Symfony\Component\Security\Core\User\UserInterface: FOSUser\UserBundle\Entity\User
        entity_managers:
            default:
                mappings:
                    FOSUserBundle: ~
                    CCDNUserSecurityBundle:
                        mapping:              true
                        type:                 yml
                        dir:                  "Resources/config/doctrine"
                        alias:                ~
                        prefix:               CCDNUser\SecurityBundle\Entity
                        is_bundle:            true­
Make sure you have gone through all the setup steps.­