Closed fatpat closed 11 years ago
Are we talking Model_Crud or ORM models?
I'm talking CRUD:
php oil generate scaffold/crud person name:string
Ok, thanks. I'll have a look.
Looks like more bugs, because on an INSERT, created_at MUST have a value. Otherwise it's existence is rather pointless...
Just looked at the Model_Crud code. On a save() it will always set the "updated_at" column, and on INSERT, it will also set the "created_at" column. According to the commit log, this was already added on 2012-01-11.
What version of FuelPHP were you using? And what code exactly generated that error?
There's a bug with the scaffolding/crud generator. Everything seems to work well but when I try to insert a new value from the generated controller into the database I have the following error:
here is the generated mysql table:
The fields created_at and updated_at can't be NULL and don't have a default value. When fuelphp is inserting the new record, those 2 fields are not set. If the MySQL server is configured to use "strict mode", then it's impossible to insert a new record without setting those 2 fields.
I think there's a bug here ...