if (typeof val !== 'object' && Dynamic.canConvert(otype)) {
val = dynamic(val, otype, ctx);
}
The previous behavior is preserved, and all failing test cases in my project pass. In theory it sounds great to cast data as much as possible, but in this case it causes a new Model instance to be created, which might have defaults set. These default values would then end up overwriting saved data when updating.
See: https://github.com/strongloop/loopback/issues/1806
When replacing this line: https://github.com/strongloop/strong-remoting/blob/master/lib/http-context.js#L213
With the following:
The previous behavior is preserved, and all failing test cases in my project pass. In theory it sounds great to cast data as much as possible, but in this case it causes a new Model instance to be created, which might have defaults set. These default values would then end up overwriting saved data when updating.