Accept operators prefixed by `$` in `Query\Builder::orWhere`

XMLWordPrintableJSON

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

       

      fn (Builder $builder) => $builder
          ->where('foo', '$type', 2)
          ->orWhere('foo', '$type', 4), 

      Should make this call:

      find({ $or: [
          { foo: { $type: 2 } },
          { foo: { $type: 4 } }
      ]})

      Currently, the operator of the 2nd is not reconized and produces an inconsistant query:

       

      find({ $or: [
          { foo: { $type: 2 } },
          [ foo: "$type" }
      ]}) 

       

       

       

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

                Created:
                Updated:
                Resolved: