fuel/core — Issue #770: model_crud save's query
Author: reikubonaga
Created: 2012-01-11 11:58:17+00:00
State: open

[model class]

class User extends Model_Crud
{
protected static $_rules = array(
"email" => "valid_email"
)
}

====================
[controller]
$user = new Model¥User(array(username=>"test"));
$user->save()
========================
error
Fuel\Core\Database_Exception [ 1048 ]: Column 'email' cannot be null [ INSERT INTO `user` (`email`, `username`) VALUES (null, 'test') ]
====================

i think the query should be
INSERT INTO `user` (`username`) VALUES ('test')