I am relatively new to Phalcon and am running into this error when trying to save a new record. I have narrowed down to this page case where the error still happens. The error is: Phalcon\Mvc\Model\Exception: Table "pages" doesn't exist on database when dumping meta-data for Pages
The core code is below. The error shows up at the save() line in the controller's saveAction(). Any help would really be appreciated.
Thanks!
A table with one column:
CREATE TABLE `pages` (
`username` varchar(120) CHARACTER SET latin1 NOT NULL
)
Model:
<?php
use Phalcon\Mvc\Model;
class Pages extends Model
{
public $username;
public function getSource()
{
return 'pages';
}
}
The Controller:
<?php
class SignupController extends \Phalcon\Mvc\Controller
{
public function saveAction()
{
$page = new Pages();
//Store and check for errors
$success = $page->save($this->request->getPost(), array('pages'));
}
}