https://github.com/mongodb/laravel-mongodb/issues/2720#issuecomment-2071709454
After updating to 4.2.0 we were happy to see that transactions are working fine,
Unfortunately "created_at" and "updated_at" fields are no longer automatically inserted in new records using firstOrCreate, createOrFirst, updateOrCreate, ...
This code creates new record with "created_at" and "updated_at" fields :
$obj = new \App\Models\Parameter; // instantiate model
$obj->created_by = 'nico';
$obj->save();
It breaks between 4.1.3 and 4.2.0Regards.
- is caused by
-
PHPLARA-218 Implement Model::createOrFirst() using findOneAndUpdate operation
-
- Closed
-
- related to
-
PHPLARA-14 laravel-mongodb - Issue #2903: updateOrCreate does not create DB entries
-
- Closed
-