Closed klvs closed 8 years ago
findById, updateById, removeById are simple convenience wrappers for the existing API. They eliminate the need to do things like:
javascript // current api var entry = await this.model.find({ where: {_id: 10} }); entry = entry.pop(); console.log('entry name': entry.name); // this PR var entry = await this.model.findById(10); console.log('entry name': entry.name);
Small contribution, but I thought it might be nice.
All of the aforementioned API changes break nothing and use the existing API (so updates should be painless). All are tested (see docs/test.js).
thank you!
findById, updateById, removeById are simple convenience wrappers for the existing API. They eliminate the need to do things like:
Small contribution, but I thought it might be nice.
All of the aforementioned API changes break nothing and use the existing API (so updates should be painless). All are tested (see docs/test.js).