0
votes

Anyone know if AliceBundle (https://github.com/hautelook/AliceBundle) supports multiple entity managers or my em mapping is somehow screwed up. I have a bundle (BundleA) that has seven entity objects but have only configured one class, EntityA, to generate entities for but when I try loading the fixtures it fails with this error:

  [Doctrine\Common\Persistence\Mapping\MappingException]
  The class 'BundleB\Entity\ClassB' was not found in the chain configured namespaces <list of namespaces not including the 'BundleB\Entity' namespace>

BundleA and BundleB are on two different entity managers and there's no direct link between them. BundleA is within the default manager while BundleB is in one of the other entity managers. Both bundles have multiple entity classes that are working fine in a live environment.

I've been checking if the entity manager mapping is set up wrong but haven't been able to see anything strange going on there so my next thing to check was to figure out if AliceBundle doesn't support multiple EMs but I can't find any documentation saying one way or the other.

All entities are Doctrine ORM entities

1
Did You check Your entity mappings in doctrine configuration? symfony.com/doc/current/doctrine/multiple_entity_managers.htmlRafal Kozlowski
Yes, I did check. I can't really post the whole thing here since it's a rather complex combination of php files reading the information from a yml file and building the mapping as a php array and as far as I can see it is correct. I will continue to dig through that array just in case (and will post an answer here if I find the problem there)h00ligan

1 Answers

0
votes

You must tell the bundle what Entity Manager to use manually by providing the --manager option.