Bug Report #4687
Database default values not available after create
To insert a record via Kohana's ORM one can use the
ORM::create method. However, that method only inserts the data without performing an additional query afterwards.
This yields the issue that default values defined in the database (e.g. CURRENT_TIMESTAMP) are not picked up and thus not available in the ORM object.
A possible fix is to perform a query right after the
DB::insert call using the primary key value available from that call and update the object data accordingly.