Uploaded image for project: 'PHP ORMs'
  1. PHP ORMs
  2. PHPORM-141

laravel-mongodb - Issue #2718: Need to support upsert function in Laravel 10

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Laravel
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      zyz954489346 has created Issue #2718: Need to support upsert function in Laravel 10 in laravel-mongodb. This Jira ticket was filed by GromNaN

      Issue Text:

      • Laravel-mongodb Version: 4.1
      • PHP Version: 8.3
      • Database Driver & Version: 4

      Description:

      The implementation of Cache's put function is modified to db's upsert function in Laravel10.
      ![image](https://github.com/mongodb/laravel-mongodb/assets/23162012/2ddc8705-7cfc-4315-81b6-46d3e51834ab)

      Steps to reproduce

      When the driver of cache is changed to mongodb,This will lead to an error. Such as this:

      Cache::store('mongdb-conn')->forever($key, $val);
      // or 
      Cache::store('mongdb-conn')->put($key, $val);
      

       

       

      The error is: This database engine does not support upserts.

            Assignee:
            Unassigned Unassigned
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: