yarn waterline 0.12.0
v0.12.0

latest releases: 0.15.2, 0.15.1, 0.15.0...
8 years ago

Finally adds support for projections! 🚀 🌟 🤘

You now have support for using .select() in both top level and association queries. Yeah it took until 2016 to get it added but we wanted to age it so it taste better.

User.find()
.select(['name', 'age'])
.populate('pets', { select: ['breed', 'name'] })
.exec(function(err, users) {});

The other big change is the ability to pass arbitrary data down to custom adapters. You have a few ways to do this:

First if you need to define custom values on an attribute for use with migrations for example you can add a meta key to an individual attribute and the values will be passed through when the schema is registered.

attributes: {
  name: {
    type: 'string',
    meta: {
      size: 256
    }
}

The other option is to pass meta values directly to a custom adapter function. Some examples are shown in #1325.

For a full roundup of changes view the updated Changelog.

Don't miss a new waterline release

NewReleases is sending notifications on new releases.