Mapping files needed for all Entities of my module ?
Opened this issue · 0 comments
Hi there,
I can't use AnnotationDriver (Class "Membre\Entity\Membre" sub class of "" is not a valid entity or mapped super class.)
So i use XmlDriver for my module Membre.
My entity used for authentication/registration is Membre\Entity\Membre
So i configured following files:
Membre\config\xml\zfcuser\Membre.Entity.Membre.dcm.xml
Membre\config\xml\zfcuserdoctrineorm\Membre.Entity.Membre.dcm.xml
But i've got 2 others entities into this module: Membre\Localisation and Membre\Spam and each time i'm trying to do something like this:
$localisationMapper = $em->getRepository('Membre\Entity\MembreLocalisation');
No mapping file found named 'Membre.Entity.MembreLocalisation.dcm.xml' for class 'Membre\Entity\MembreLocalisation'.
Im a supposed to write an xml mapper file for each entity of my module Membre?
Here is my config file:
return array(
'doctrine' => array(
'driver' => array(
'membre_entity' => array(
#'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
#'paths' => array('module/Membre/src/Membre/Entity')
'class' => 'Doctrine\ORM\Mapping\Driver\XmlDriver',
'paths' => 'module/Membre/config/xml/zfcuser'
),
'orm_default' => array(
'drivers' => array(
'Membre\Entity' => 'membre_entity'
)
)
)
),
);