RELEASE-NOTES: describe 30283291
Add an entry for a breaking change made in 30283291
that was not
described previously.
This commit is contained in:
parent
ca0c3aaa47
commit
41d71c5a5b
|
@ -18,4 +18,19 @@ via `global.Promise`,
|
|||
you will have to check all places where you are using non-standard promise API
|
||||
and update them to use Bluebird API instead.
|
||||
|
||||
Please see [Related code change](https://github.com/strongloop/loopback-datasource-juggler/pull/790) here.
|
||||
Please see [Related code change](https://github.com/strongloop/loopback-datasource-juggler/pull/790) here.
|
||||
|
||||
## DAO.find provides ctx.data in "loaded" hook
|
||||
|
||||
When implementing "loaded" hook for `DAO.find` method, we have mistakenly
|
||||
implemented a version that sets `ctx.instance` instead of `ctx.data`. This
|
||||
defeats the purpose of the "loaded" hook, which is to allow hooks to modify
|
||||
the raw data provided by the datasource before it's used to build a model
|
||||
instance.
|
||||
|
||||
This has been fixed in 3.0 and the "loaded" hook now consistently provides
|
||||
`ctx.data` for all operations. If you have a "loaded" hook handler that
|
||||
checks `if (ctx.instance)` then you can remove this condition together with
|
||||
the branch that follows.
|
||||
|
||||
See also the commit [30283291](https://github.com/strongloop/loopback-datasource-juggler/commit/30283291?w=1)
|
||||
|
|
Loading…
Reference in New Issue