I’m trying to get CI 2 and Doctrine 2 to work together, so far everything is going fine. However I now have a problem concerning the Proxy classes.
For some reason the proxy class is looking for a mapping file, which I don’t have. Is this the normal behaviour?
The exception I get is:
'No mapping file found named 'proxies.modelsUserProxy.dcm.xml' for class 'proxies\modelsUserProxy'.'
Do I have to write mappings myself for the proxy classes? :/
I’ll paste some of my code here:
// Proxy configuration
$config->setProxyDir(APPPATH.'proxies');
$config->setProxyNamespace('proxies');
$config->setAutoGenerateProxyClasses( TRUE );
The xml mapping in: mappings/models.User.dcm.xml
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="models\User">
...
</entity>
Any information on this?
you can find the answer on the following link (http://www.tlswebsolutions.com/codeigniter-2-and-doctrine-2-integration-a-working-setup-doctrineignited/) also, there’s (http://wildlyinaccurate.com/integrating-doctrine-2-with-codeigniter-2/).
The first one, you can download a working Codeigniter2 + doctrine2.
Hope this helps 😉