tgriesser/bookshelf — pull request #230 by tgriesser (2014-02-09 16:29:11+00:00)
Title: updatePivot tweaks

@johanneslumpe been in the process of doing a once over of everything before cutting a new patch release... and I made changes to the `updatePivot` method. Ultimately I want to revisit and rewrite the entire pivot relation stuff, but in the short term this seems like a good compromise.

The main concern was the method signature being a non-standard, with `updateWheres` after `options`.
My solution was to allow a `query` property on the option hash for update/delete, which uses the `Helpers.query` method (similar to the query method for a model or collection).

I also eliminated the test case for:
`updates a single matching row inside the pivot table if an `id` is passed with the data`

`id` in this case is kind of arbitrary, right? It could be just as easily accomplished with the `query` param.

Anyway, let me know if you spot anything I missed here and I'll merge and cut a new release.