Hello, I'm trying to build php classes with orm:generate-entities, it all works well without a namespace
But when I add the 'entidades' namespace, I have the following problem
This is my xml generated with Skipper, "Cartilla,dcm.xml"
<?xml version="1.0"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="entidades\Cartilla" inheritance-type="SINGLE_TABLE">
<id name="id" type="integer">
<generator strategy="AUTO"/>
</id>
<many-to-one field="sucursal" target-entity="entidades\Sucursal" inversed-by="cartilla">
<join-columns/>
</many-to-one>
<many-to-one field="nomenclador" target-entity="entidades\Nomenclador" inversed-by="cartilla">
<join-columns>
<join-column name="nomenclador_id" referenced-column-name="id"/>
</join-columns>
</many-to-one>
<many-to-one field="coseguro" target-entity="entidades\Coseguro" inversed-by="cartilla">
<join-columns>
<join-column name="coseguro_id" referenced-column-name="id"/>
</join-columns>
</many-to-one>
<many-to-one field="plan" target-entity="entidades\Plan" inversed-by="cartilla">
<join-columns>
<join-column name="plan_id" referenced-column-name="id"/>
</join-columns>
</many-to-one>
<discriminator-column name="discrimina" length="30" type="string"/>
<discriminator-map>
<discriminator-mapping class="entidades\Comedica" value="comedica"/>
<discriminator-mapping class="entidades\Osadef" value="osadef"/>
</discriminator-map>
</entity>
</doctrine-mapping>
This is my bootstrap.php file
<?php
use Doctrine\ORM\Tools\Setup;
require_once "vendor/autoload.php";
$isDevMode = true;
$config = Setup::createXMLMetadataConfiguration(array(__DIR__."/xml"), $isDevMode);
//
$conn = array(
'driver' => 'pdo_mysql', //driver de mysql
'user' => '', // usuario
'password' => '', // pass
'dbname' => 'cartilla', //nombre de la base de datos
'host' => 'localhost'
);
//gerenciador de entidades
$entityManager = \Doctrine\ORM\EntityManager::create($conn, $config);
I get the following error when I run vendor\bin\doctrine.php.bat orm:generate-entities src
[Doctrine\Common\Persistence\Mapping\MappingException]
Invalid mapping file 'Cartilla.dcm.xml' for class 'Cartilla'.
Im on Windows 7 / Xampp / Doctrine 2 / Skipper
Thank you in advance.