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

Throw an exception when Laravel Builder::push() is used incorrectly

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Laravel
    • Labels:
      None

      Comment from andreas.braun@mongodb.com 

      I can identify three ways of calling the method:

      • Push a single value (object or otherwise): push('fieldName', 'foo')
      • Push a list of values using $eachpush('fieldName', ['foo', 'bar'])
      • Specify a raw value for the selected operator: push(['fieldName' => 'foo', 'otherField' => 'bar'])

      Throwing an exception is probably the best course of action and we should make sure to document the usages accordingly.

       

            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:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: