Bookshelf v0.14.0 Release Notes
Release Date: 2018-12-09 // over 5 years ago-
0.14.0 Dec 09, 2018 - Diff
๐ฅ Breaking changes
- The
previous()
andpreviousAttributes()
methods were changed so that whenever a model is saved or destroyed the previous attributes are no longer reset to the current attributes. Since the old behavior wasn't very useful it's likely this won't cause issues for many people. There's a migration guide in case you are affected by this change. #1848 - ๐ Fix incorrect results in collection when models have duplicate ids. Checkout the migration guide in case you are affected by this. #1846
- Empty
hasOne
relation will now returnnull
instead of{}
when serialized: #1839. There's a migration guide in the rare event this causes you problems. - โ Add more helpful error messages on bad or insufficient
morphTo
data: #1824. There's a migration guide in case you are affected by this. - โก๏ธ Changed the existing functionality so that saving a model that hasn't changed will not update its
updated_at
attribute: #1798. Checkout the migration guide in case you are affected by this.
โจ Enhancements
- ๐ Make collections iterable using
for ... of
loops: #1830 - โ Add row-level locking options: #1810
๐ Bug fixes
- ๐ฏ Return clones of nested objects in
previousAttributes()
: #1876 - ๐ Fix incorrect
rowCount
value when usinggroupBy
withfetchPage()
: #1852 - ๐ Fix eager loading of relations when using
parse
/format
: #1838 - ๐ Fix inability to install bookshelf from git commit: #1835
- ๐ Fix
timestamp()
setting a key named"null"
in some cases: #1820 - ๐ Fix performance of including relationships: #1800
โ Test Suite
- โ Add test to check for adding
withRelated
inside events: #1853 - โ Add Node.js 10 to the Travis config: #1829
- ๐ Fix incorrect output ordering in tests in some cases: #1825
๐ Documentation
- ๐ Change the JSDoc theme to add a Guides section (this was already released): #1909
- ๐ Fix
hasOne
's doc: #1890 - ๐ Fix many-to-many tutorial code: #1888
- โ Add code syntax highlighting for tutorials: #1850
- ๐ Fix a few issues with the collection documentation: #1836
- ๐ Fix
Model.load()
relations param: #1834 - ๐ Fix incorrect docs for collection:fetching event: #1831
- โ Add note on needing the Pagination plugin to use
fetchPage()
: #1803 - ๐ Fix incorrect data types and undocumented Model property: #1797
Dependencies
- The