fuel/oil — Issue #49: Oil generate scaffolding with orm option generating model_crud code in controller
Author: silentworks
Created: 2011-10-25 22:44:45+00:00
State: open

Each time I create a new scaffolding using the orm option I seem to get a call to the model in my controller looking like

Company::find_all();

And this throws an error

Fuel\Core\Database_Exception [ Error ]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.' in 'where clause' with query: "SELECT `t0`.`id` AS `t0_c0`, `t0`.`name` AS `t0_c1`, `t0`.`phone` AS `t0_c2`, `t0`.`address` AS `t0_c3`, `t0`.`postcode` AS `t0_c4`, `t0`.`email` AS `t0_c5`, `t0`.`created_at` AS `t0_c6`, `t0`.`updated_at` AS `t0_c7` FROM `companies` AS `t0` WHERE `t0`.`id` = '0' OR ((`t0`.`` IS NULL)) LIMIT 1"

When I change this to

Company::find('all');

That error no longer exist.