createOrFirst does not set timestamp fields

XMLWordPrintableJSON

    • None
    • PHP Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      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.0

      Regards.

              Assignee:
              Unassigned
              Reporter:
              Jérôme Tamarelle
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: