Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in viewing contact information #2

Open
dranzd opened this issue Nov 21, 2012 · 1 comment
Open

Error in viewing contact information #2

dranzd opened this issue Nov 21, 2012 · 1 comment

Comments

@dranzd
Copy link

dranzd commented Nov 21, 2012

After creating a contact record, viewing the details with url: localhost/contact/1 generates an error message.

File:
myapp/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Statement.php:216

Message:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'myapp.address' doesn't exist

Stack trace:
#0 /myapp/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Statement.php(216): PDOStatement->execute()
#1 /myapp/vendor/ZfcBase/src/ZfcBase/Mapper/AbstractDbMapper.php(118): Zend\Db\Adapter\Driver\Pdo\Statement->execute()
#2 /myapp/vendor/SpeckContact/src/SpeckContact/Mapper/AddressMapper.php(30): ZfcBase\Mapper\AbstractDbMapper->select(Object(Zend\Db\Sql\Select))
#3 /myapp/vendor/SpeckContact/src/SpeckContact/Service/ContactService.php(72): SpeckContact\Mapper\AddressMapper->findByContactId('1')
#4 /myapp/vendor/SpeckContact/src/SpeckContact/Service/ContactService.php(27): SpeckContact\Service\ContactService->getExtras(Object(SpeckContact\Entity\Contact))
#5 /myapp/vendor/SpeckContact/src/SpeckContact/Controller/ContactController.php(55): SpeckContact\Service\ContactService->findById('1')
#6 /myapp/vendor/ZF2/library/Zend/Mvc/Controller/AbstractActionController.php(87): SpeckContact\Controller\ContactController->viewAction()
#7 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#8 /myapp/vendor/ZF2/library/Zend/EventManager/EventManager.php(469): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#9 /myapp/vendor/ZF2/library/Zend/EventManager/EventManager.php(209): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#10 /myapp/vendor/ZF2/library/Zend/Mvc/Controller/AbstractController.php(108): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#11 /myapp/vendor/ZF2/library/Zend/Mvc/DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#12 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#13 /myapp/vendor/ZF2/library/Zend/EventManager/EventManager.php(469): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#14 /myapp/vendor/ZF2/library/Zend/EventManager/EventManager.php(209): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 /myapp/vendor/ZF2/library/Zend/Mvc/Application.php(298): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#16 /myapp/public/index.php(12): Zend\Mvc\Application->run()
#17 {main}

Replacing line 25 of file SpeckContact/src/SpeckContact/Mapper/AddressMapper.php from
->join(array('a' => 'address'), 'a.address_id = ca.address_id');
to
->join(array('a' => 'contact_addresses'), 'a.address_id = ca.address_id');
seems to fix the problem.

@nclundsten
Copy link
Contributor

that looks right, could you add a pr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants