- On include = true or include = 1 the lib crashes with
"TypeError: includes.forEach is not a function".
- checking for boolean and number type and return empty array.
- fix: include symbol and function in normalization
- fix: review changes; adding debug stmt + early exit for tests
Before this change, when a property was configured with a default value
at LoopBack side and the database was returned a record with a missing
value for such property, then we would supply use the configured
default.
This behavior is problematic for reasons explained in #1692.
In this commit, we are introducing a new model-level setting called
`applyDefaultsOnReads`, which is enabled by default for backwards
compatibility.
When this setting is set to `false`, operations like `find` and
`findOrCreate` will NOT apply default property values on data returned
by the database (connector).
Please note that most of the other CRUD methods did not apply default
values on database data as long as the connector provided native
implementation of the operation, that aspect is not changing.
Also note that default values are applied only on properties with
`undefined` values. The value `null` does not trigger application of
default values. This is important because SQL connectors return
`null` for properties with no value set.
Also remove a flaky test assertion that reports different results
on different Node.js versions. This assertion has been already
removed on `master` branch (3.x version line).
* Fix#1434 2.55.1 Throws when using where query against "JSON Object or ANY" Type (#1444) (Shing)
* castPropertyValue: throw on malformed types (Kevin Delisle)
In the fromDb step, nested properties weren't being hydrated properly.
This caused an issue with the ability to search on such properties as
Dates. The properties would be hydrated as a String type, and as such,
it was impossible to properly query on them.
* Fix assert as array does not guarantee order (Candy)
* Fixed empty objList in linkOneToMany fn (#1287) (somename85)
* remove equality value for user-defined id (#1292) (Matteo Padovano)
* override collection name for arangodb (#1274) (Matteo Padovano)
* fix missing findOrCreate error callback (Ryan Graham)
Some connector, like arangodb, not support id as Number.
When `forceId` is set to true and id is set `Model.isValid`
report error and the field id is not coerced.