'Symfony working with multiple db create Entity for a db

I'm trying to work with multiple db in symfony I followed the documentation: https://symfony.com/doc/current/doctrine/multiple_entity_managers.html . I had some Entities creates and now I don't know how to use them.

My doctrien.yaml

doctrine:
    dbal:
        default_connection: default
        connections:
            default:
                url: '%env(resolve:DATABASE_URL)%'
                driver: 'pdo_mysql'
                server_version: '5.7'
                charset: 'utf8mb4'
            customers:
                url: '%env(resolve:DATABASE_CUSTOMERS)%'
                driver: 'pdo_mysql'
                server_version: '5.7'
                charset: 'utf8mb4'
    orm:
        default_entity_manager: default
        entity_managers:
            default:
                connection: default
                mappings:
                    Main:
                        is_bundle: false
                        type: annotation
                        dir: '%kernel.project_dir%/src/Entity/Main'
                        prefix: 'App\Entity\Main'
                        alias: Main
                auto_mapping: true
            customers:
                connection: customers
                mappings:
                    Lacoste:
                        is_bundle: false
                        type: annotation
                        dir: '%kernel.project_dir%/src/Entity/Customers'
                        prefix: 'App\Entity\Customers'
                        alias: Customers

If i pass the entity to the folder I want gives this error

Warning: include(/Applications/XAMPP/xamppfiles/htdocs/project/vendor/composer/../../src/Entity/Company.php): failed to open stream: No such file or directory.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source