Skip to content

v0.12.0

Compare
Choose a tag to compare
@particlebanana particlebanana released this 18 Mar 17:57
· 1472 commits to master since this release

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.