oil g scaffold post title:varchar[50] body:text user_id:int --orm
Fuel\Core\Database_Exception [ Error ]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.' in 'where clause' with query: "SELECT `t0`.`title` AS `t0_c0`, `t0`.`body` AS `t0_c1`, `t0`.`user_id` AS `t0_c2` FROM `posts` AS `t0` WHERE `t0`.`id` = '0' OR ((`t0`.`` IS null)) LIMIT 1"
COREPATH/classes/database/mysql/connection.php @ line 210
COREPATH/classes/database/query.php @ line 240 PKGPATH/orm/classes/query.php @ line 901 PKGPATH/orm/classes/query.php @ line 959 PKGPATH/orm/classes/model.php @ line 424 PKGPATH/orm/classes/model.php @ line 545 APPPATH/classes/controller/frocks.php @ line 8 APPPATH/classes/controller/frocks.php @ line 8 COREPATH/classes/request.php @ line 443 DOCROOT/index.php @ line 38
protected static $_properties = array('title', 'body', 'user_id');
protected static $_properties = array('id', 'title', 'body', 'user_id');
protected static $_properties = array('id', 'title', 'body', 'user_id', 'updated_at', 'created_at');
'connection' => array( 'dsn' => 'mysql:host=localhost;dbname='mypersonal_fuel_dbname', 'username' => 'mypersonal_fuel_dbuser', 'password' => 'mypersonal_fuel_password',
oil g scaffold foo title:varchar[50] body:text user_id:int --orm
refine...statement afterwards, you're warned explicitly that the table's missing.
Fuel\Core\Database_Exception [ Error ]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'fuelstationwagon.sw_foos' doesn't exist with query: "SELECT `sw_foos`.* FROM `sw_foos`"
oil g model foo title:varchar[50] body:text user_id:int --ormgenerates a "foo" model using Model\orm as expected. Then running:
php oil g scaffold --orm foothrows the expected error:
Model_Name::find_allto
Model_Name::find('all');it seems to work. The ORM model doesn't have a find_all function like the CRUD model does for some reason. I hope that's your problem as I did the same thing in changing from CRUD to ORM and was getting the same error with action_index()
oil g scaffold post title:varchar[50] body:text user_id:int --ormonly creates the definition for the table structure, not the table structure itself. See if
oil r migrateproduces some better results. PS. As stated, this might not be relevant and I'm only new here.
It looks like you're new here. If you want to get involved, click one of these buttons!