{"push_id":617968951,"size":1,"distinct_size":1,"ref":"refs/heads/promises-related","head":"df088f8e715bad1d0ed7d9d25b180c6eda725cc9","before":"9ac4d7deb4b0436af7ce29ed3f4b95128f49b99e","commits":[{"sha":"df088f8e715bad1d0ed7d9d25b180c6eda725cc9","author":{"email":"f6a8fed4b885eb8e04fa88c7cebd6a2830af0019@gmail.com","name":"Partap Davis"},"message":"Promisify model relation methods\n\nWhen a callback is omitted from a method on a model relation that\nsupports promises, return that promise.  This includes all the standard\nDAO methods, as well as any user-defined methods that return promises.\n\ne.g.:\nmylist.todos.create({name: 'Item 1'}) // returns Promise\n\nThis API will use native ES6 promises if available.  If not available,\nor to force the use of another Promise library, you must assign the\nglobal.Promise object.\n\ne.g.:\nglobal.Promise = require('bluebird')\n\nRelations affected:\n\n- BelongsTo\n- HasOne\n- HasMany\n- HasManyThrough\n- HasAndBelongsToMany\n- ReferencesMany\n- EmbedsOne\n\nExceptions:\n\nThe EmbedsMany relation has not been promisified, because most of the\nmethods return synchronous values.\n\nThe base relation getter method [e.g.: mylist.todos()] has not been\npromisified, due to its default caching behavior.\n\nNew Methods:\n\n- getAsync(condition, cb)\n\nA new method \"getAsync()\" has been added to all relations except\nEmbedsMany, which always fetches from the datasource rather than from\nthe cache.  It takes an optional \"where\" condition (except for HasOne\nand BelongsTo) and an optional callback.  If the callback is omitted,\na Promise is returned.","distinct":true,"url":"https://api.github.com/repos/partap/loopback-datasource-juggler/commits/df088f8e715bad1d0ed7d9d25b180c6eda725cc9"}]}