php oil g scaffold persons name:string phone:string ..etc
php oil r migrate
and this generate all files with right table/model etc name - "Controller_Persons", "Model_Person", etc.
but, when i try to request controller: /persons - i get such error:
Error - 2012-11-16 04:06:30 --> Error - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd2.people' doesn't exist with query: "SELECT `t0`.`id` AS `t0_c0`, `t0`.`name` AS `t0_c1`, `t0`.`link_vk` AS `t0_c2`, `t0`.`phone` AS `t0_c3`, `t0`.`email` AS `t0_c4`, `t0`.`address` AS `t0_c5`, `t0`.`description` AS `t0_c6`, `t0`.`city` AS `t0_c7`, `t0`.`created_at` AS `t0_c8`, `t0`.`updated_at` AS `t0_c9` FROM `people` AS `t0`" in D:\AppServ\OpenServerSites\d2.local\fuel\core\classes\database\pdo\connection.php on line 175
for some reason, fuelphp trying to fetch database named "people" but not persons
And to be compleet, the convention is that a model name is singular ("Person") as a model object deals with one person, the table and the controller names are plural ("People") as they deal with multiple persons.
Thi s sounds very interesting: I've used Rails for a while and there there is the convention to use the plural form (so "Persons", singular + s) unless you manually modify it.