Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
ZF2 + Doctrine2: Entity is saved but finding it returns no result #2519
ZF2 + Doctrine2: Entity is saved but finding it returns no result
I have a sample test below which fails when I try to retrieve the persisted entity
I was trying to debug it and found out that the entity manager ZF2 holds is different
I tried to update the code at ZF2 modules (ZF2::_getEntityManager) from:
and this makes the test pass.
I don't know if this is a bug or I just don't have my configurations entered correctly. If
grabServiceFromContainer executes Application::init($this->applicationConfig)
_before method executes it first and assigns it to $this->application
If the only purpose of the grabServiceFromContainer('service') is the same as $zf2App->getServiceManager()->get('service'), you are probably correct that the grabServiceFromContainer should use the $this->application instead of doing an init on the Application again.