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

whereNot creates incorrect query using $not operator

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • laravel-4.0.0
    • Affects Version/s: laravel-4.0.0
    • Component/s: Laravel
    • None

      User::whereNot('title', 'admin')->get()

      Generates the following query

      { $not: { title: 'admin' }}

      Which is incorrect

      unknown top level operator: $not. If you are trying to negate an entire expression, use $nor.

            Assignee:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Reporter:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: