---
doctrine_mongodb:
    auto_generate_proxy_classes: true
    auto_generate_hydrator_classes: true
    connections:
        default:
            server: '%env(resolve:MONGODB_URL)%'
        customer:
            id: doctrine_mongodb.odm.customer_connection
        master:
            server: '%env(resolve:MONGO_MASTER_URL)%'
    default_database: '%env(resolve:MONGODB_DB)%'
    default_connection: customer
    document_managers:
        default:
            connection: customer
            auto_mapping: false
            mappings:
                Aes:
                    is_bundle: false
                    type: attribute
                    dir: '%kernel.project_dir%/src/Document'
                    prefix: 'Aes\Document'
                    alias: Aes
                Master:
                    is_bundle: false
                    type: attribute
                    dir: '%kernel.project_dir%/master/Document'
                    prefix: 'Master\Document'
                    alias: Master
                translatable:
                    type: attribute # or annotation or xml
                    alias: GedmoDocument
                    prefix: Gedmo\Translatable\Document
                    # make sure vendor library location is correct
                    dir: "%kernel.project_dir%/vendor/gedmo/doctrine-extensions/src/Translatable/Document"
            filters:
                customer_code_filter:
                    class: Aes\Filter\CustomerCodeFilter
                    enabled: true
                    parameters:
                        customerCode: Aes\Security\Authenticator\VaultAuthenticator::getUri()
                hash_code_filter:
                    class: Aes\Filter\HashCodeFilter
                    enabled: true
                    parameters:
                        hashCode: ""
                paperless_confidentiality:
                    class: Aes\Filter\PaperlessFilter
                    enabled: true

when@prod:
    doctrine_mongodb:
        auto_generate_proxy_classes: false
        auto_generate_hydrator_classes: false
        document_managers:
            default:
                metadata_cache_driver:
                    type: service
                    id: doctrine_mongodb.system_cache_pool

    framework:
        cache:
            pools:
                doctrine_mongodb.system_cache_pool:
                    adapter: cache.system
