Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add the Doctrine mapping of the Payum Core models? #10

Closed
pdrosos opened this issue Nov 3, 2014 · 1 comment
Closed

How to add the Doctrine mapping of the Payum Core models? #10

pdrosos opened this issue Nov 3, 2014 · 1 comment

Comments

@pdrosos
Copy link

pdrosos commented Nov 3, 2014

Hello,

I am using Zend Framework with Doctrine and I would like to use the Payum Doctrine storage.
But I can't load the Payum's Core models mappings properly.
My Doctrine configuration inside the module where my entities are is:

'doctrine' => array (
    'driver' => array (
        'Payum_models' => array (
            'class' => 'Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver',
            'cache' => 'array',
            'paths' => array(
                __DIR__ . '/../../../vendor/payum/payum/src/Payum/Core/Bridge/Doctrine/Resources/mapping',
            )
        ),
        __NAMESPACE__ . '_entities' => array (
            'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
            'cache' => 'array',
            'paths' => array(
                __DIR__ . '/../src/' . __NAMESPACE__ . '/Entity',
            )
        ),
        'orm_default' => array(
            'drivers' => array(
                'Payum\Core\Model' => 'Payum_models',
                __NAMESPACE__ . '\Entity' => __NAMESPACE__ . '_entities',
            )
        )
    )
),

And I receive the following error:

[Doctrine\Common\Persistence\Mapping\MappingException]
File mapping drivers must have a valid directory path, however the given path 0 seems to be incorrect!

Could you please help me how to configure the Payum Core Doctrine mappings correctly?
Thank you in advance!

@makasim
Copy link
Member

makasim commented Mar 31, 2015

Do you use payum/payum or payum/core only? The path to mapping files will be different in both cases.

@makasim makasim closed this as completed Jun 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants