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

laravel-mongodb - Issue #3039: [Feature Request] Support converting arrow into dot notation in where

    • Needed
    • Hide

      In field paths, the arrow "->" is an alias for MongoDB dot. 

      This improves compatibility with JSON fields in laravel

      https://laravel.com/docs/11.x/queries#json-where-clauses

       

      Show
      In field paths, the arrow "->" is an alias for MongoDB dot.  This improves compatibility with JSON fields in laravel https://laravel.com/docs/11.x/queries#json-where-clauses  

      masterbater has created Issue #3039: [Feature Request] Support converting arrow into dot notation in where in laravel-mongodb. This Jira ticket was filed by GromNaN

      Issue Text:

      Is your feature request related to a problem?

      https://github.com/filamentphp/filament/blob/be6290f0d01d3b589274284592e7e3c777e674df/packages/notifications/src/Livewire/DatabaseNotifications.php#L87

      This line causes issue like This database engine does not support JSON operations.
      `return $this->getUser()>notifications()>where('data->format', 'filament');`

      This package could internally convert data->format into data.format to work?

      This doesnt state that WhereJson** queries is not supported or arrow queries
      ```
      The following Eloquent methods are not supported in Laravel MongoDB:

      toSql()

      toRawSql()

      whereColumn()

      orWhereColumn()

      whereFulltext()

      groupByRaw()

      orderByRaw()

      inRandomOrder()

      union()

      unionAll()

      havingRaw()

      having()

      havingBetween()

      orHavingRaw()

      whereIntegerInRaw()

      orWhereIntegerInRaw()

      whereIntegerNotInRaw()

      orWhereIntegerNotInRaw()
      ```

            Assignee:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: