Hi guys, I am a very beginner with phalcon, I started just few days ago.
I found this problem on Phalcon Documentation 1.3.0 - Tutorial 3: Creating a Simple REST API (pdf format)
When I invoke /api/robots via Browser I receive the following exception
Table "robots" doesn't exist on database when dumping meta-data
By Googling around the web I found the fix. Here you are
1) Go on Robots.php file 2) Just before the function validation() add the following snippet
**public function getSource(){
return 'Robots';
}**
Maybe it could be useful add that to the official documentation. Furthemore I kindly suggest to attach the database definition to the tutorial. This is the mine one
**drop database if exists restapi;
create database restapi;
use restapi;
create table Robots (
`id` int(11) not null auto_increment,
`name` varchar(100) not null default '',
`type` varchar(100) not null default '',
`year` int(11) unsigned not null,
primary key(`id`)
);
insert into Robots (name, type, year) values ('Terminator','mechanical','1980'),('Robocop','mechanical','1992'),('Astro Boy','virtual','1986'),('Cyborg','droid','1975');
I hope this helps.