0

I am struggling to define entity mapper found here: https://github.com/Payum/PayumBundle/blob/master/Resources/doc/capture_funds_with_paypal_express_checkout.md#2-a-configure-doctrine-storage

    payum:
    contexts:
        your_context_name:
            doctrine_storage:
                driver: orm
                model_class: AcmeDemoBundle\Entity\PaypalPaymentInstruction

doctrine:
    orm:
        entity_managers:
            default:
                mappings: 
                    payum_paypal_express_checkout_nvp:                          
                        is_bundle: false
                        type: xml 
                        dir: %kernel.root_dir%/../vendor/payum/paypal-express-checkout-nvp/src/Payum/Paypal/ExpressCheckout/Nvp/Bridge/Doctrine/Resources/mapping
                        prefix: Payum\Paypal\ExpressCheckout\Nvp\Bridge\Doctrine\Entity

My current doctrine configuration is having an autoload to true. Problem I have is to make this mapping work with my autoload: true

I can get mapping to work when i remove my autoload: true but Any tips would be much appreciated, but question is how do i create a table from this mapping information?

Charles
  • 50,943
  • 13
  • 104
  • 142
rat4m3n
  • 1,201
  • 2
  • 16
  • 23

1 Answers1

1

This config works well for me. It added an id feild(it is come from bundle and was automapped) and the rest field come from manually defined mapping.

I added an example to sandbox. It works fine.

doctrine:
    dbal:
        driver:   %database_driver%
        host:     %database_host%
        port:     %database_port%
        dbname:   %database_name%
        user:     %database_user%
        password: %database_password%
        charset:  UTF8
        # if using pdo_sqlite as your database driver, add the path in parameters.yml
        # e.g. database_path: %kernel.root_dir%/data/data.db3
        # path:     %database_path%

    orm:
        auto_generate_proxy_classes: %kernel.debug%
        auto_mapping: true

        mappings:
            payum_paypal_express_checkout_nvp:                          
                is_bundle: false
                type: xml 
                dir: %kernel.root_dir%/../vendor/payum/paypal-express-checkout-nvp/src/Payum/Paypal/ExpressCheckout/Nvp/Bridge/Doctrine/Resources/mapping
                prefix: Payum\Paypal\ExpressCheckout\Nvp\Bridge\Doctrine\Entity
Maksim Kotlyar
  • 3,821
  • 27
  • 31