Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some Model and Collection lodash based methods #2005

merged 3 commits into from
Aug 11, 2019


Copy link


This removes some Model and Collection methods that are just a pass-through to the same named lodash methods.


These methods are not very useful or they duplicate functionality, so they should be removed. Some of them are so strange that no one is really sure why they're still around or if they even make sense, like Model#invert.

In the case of Collection#first and Collection#last, they are useful as shortcuts for some often needed model, but there is no need to use lodash for that functionality.

Closes #2004.

Proposed solution

A lot of these methods are simply removed. See the linked issue for the complete list. A migration guide is provided to help people that might be using these methods.

There are also two methods that are re-implemented using functionality that is already available in Bookshelf, without the need to involve lodash: Collection#first and Collection#last. There is no difference in terms of functionality in this case.

Current PR Issues

Breaks backwards-compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

Remove useless Model and Collection methods
1 participant