Commit Graph

2982 Commits

Author SHA1 Message Date
biniam 72d1bf6cde 3.31.0
* fix: allow coercion of nested properties (biniam)
 * Add support for Node.js 12.x (Miroslav Bajtoš)
 * chore: remove kv-extreme-scale from downstream (#1722) (Diana Lau)
2019-05-03 19:13:14 -04:00
Biniam Admikew 4f31db1b64
Merge pull request #1726 from strongloop/fix/nested-property-coercion
fix: allow coercion of nested properties

Handle model definitions with nested property
definitions for coercion of primitive values.
2019-05-03 19:08:04 -04:00
biniam 4924241028 fix: allow coercion of nested properties
Handle model definitions with nested property
definitions for coercion of primitive values.
2019-05-03 18:38:44 -04:00
Miroslav Bajtoš e27efd9ea5
Merge pull request #1729 from strongloop/chore/add-node-12-3x
Add support for Node.js 12.x [3.x]
2019-05-02 12:58:36 +02:00
Miroslav Bajtoš 70b3d219ab
Add support for Node.js 12.x
- Fix code to pass all tests on Node.js 12
- Add Node.js 12 to the list of Travis CI platforms
2019-04-30 09:14:37 +02:00
Diana Lau a4e69353e9
chore: remove kv-extreme-scale from downstream (#1722) 2019-04-18 12:13:03 -04:00
biniam b7ea7458e3 3.30.0
* fix: coerce primitive properties on update (biniam)
 * fix: coerce date array properties (biniam)
 * fix: add index for couchdb tests (#1720) (Janny)
2019-04-18 10:54:22 -04:00
Biniam Admikew 730918f23d
Merge pull request #1719 from strongloop/fix/primitive-datatypes-coercion-3x
Fix primitive datatypes coercion [3.x]

Make sure we coerce Date values properly when creating new
model instances. Also make sure we use the coerced data values
for model instance for update operation.
2019-04-18 10:44:46 -04:00
biniam df4366eb31 fix: coerce primitive properties on update
Make sure we use the coerced data values for
model instance for update operation.
2019-04-18 10:12:10 -04:00
biniam f2113d2c70 fix: coerce date array properties
Make sure we coerce Date values properly when creating new
model instances.
2019-04-18 10:09:50 -04:00
Janny f21e770016
fix: add index for couchdb tests (#1720) 2019-04-17 15:16:06 -04:00
Miroslav Bajtoš 9095f32859
3.29.2
* fix: normalize include with boolean or number (spurreiter)
2019-04-15 12:51:50 +02:00
Miroslav Bajtoš 22f8babf4a
Merge pull request #1717 from strongloop/fix/include-crash-3x
fix: normalize include with boolean or number
2019-04-12 17:49:12 +02:00
spurreiter d67aeb18b0
fix: normalize include with boolean or number
- 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
2019-04-12 17:05:41 +02:00
jannyHou 127b45bf59 3.29.1
* fix: ignore git file 3.x (#1713) (Janny)
2019-04-10 10:53:15 -04:00
Janny 983a75f561
fix: ignore git file 3.x (#1713) 2019-04-10 10:52:01 -04:00
Miroslav Bajtoš e4a605d436
3.29.0
* Do not apply default values on data from database (Miroslav Bajtoš)
 * feat: support array within array in 3.x (Hage Yaapa)
 * feat: Support "type" key in sub-properties in 3.x (Hage Yaapa)
 * fix: use existing field in exclude test (biniam)
 * eslint: manually fix remaining problems (Miroslav Bajtoš)
 * eslint: autofix linting errors (Miroslav Bajtoš)
 * eslint: upgrade eslint-config-loobpack to latest (Miroslav Bajtoš)
2019-04-09 18:18:55 +02:00
Miroslav Bajtoš b8e08b759b
Merge pull request #1705 from strongloop/fix/default-value-in-response-3x
Do not apply default values on data from database
2019-04-09 15:29:51 +02:00
Miroslav Bajtoš fd03302f08
Do not apply default values on data from database
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.
2019-04-09 13:03:37 +02:00
Hage Yaapa 2f093ce254
Merge pull request #1701 from strongloop/3x/list-format
feat: support array within array in 3.x
2019-03-19 19:06:14 +05:30
Hage Yaapa 16ffd42c94
Merge pull request #1700 from strongloop/3x/type-sub-property
feat: Support "type" key in sub-properties in 3.x
2019-03-19 19:04:39 +05:30
Hage Yaapa d8e1c2c020 feat: support array within array in 3.x 2019-03-14 16:46:03 +05:30
Hage Yaapa 05b0d16c4a feat: Support "type" key in sub-properties in 3.x 2019-03-07 16:50:29 +05:30
Biniam Admikew 8be05cabde
Merge pull request #1683 from strongloop/fix/include-test-3.x
fix: use existing field in exclude test
2019-01-17 15:38:39 -05:00
biniam fdcae1f583 fix: use existing field in exclude test
Co-authored-by: Raymond Feng <rfeng@us.ibm.com>
2019-01-17 15:06:45 -05:00
Miroslav Bajtoš e141693e26
Merge pull request #1676 from strongloop/upgrade-eslint-config-3x
Upgrade eslint-config-loopback to latest
2018-12-07 18:07:23 +01:00
Miroslav Bajtoš b03ee61d37
eslint: manually fix remaining problems 2018-12-07 17:14:57 +01:00
Miroslav Bajtoš 481ad566d2
eslint: autofix linting errors 2018-12-07 17:13:48 +01:00
Miroslav Bajtoš 7eafe12042
eslint: upgrade eslint-config-loobpack to latest 2018-12-07 17:13:23 +01:00
Raymond Feng 293b093ffe 3.28.0
* Use options from request for settings (Raymond Feng)
2018-11-15 08:24:17 -08:00
Raymond Feng 4a6ea992fb Use options from request for settings 2018-11-15 08:23:23 -08:00
Raymond Feng 5229863812 3.27.0
* Allow flags to be passed via options (Raymond Feng)
 * chore: update file list for apidocs (biniam)
2018-11-12 11:38:39 -08:00
Raymond Feng 4d66702a37 Allow flags to be passed via options 2018-11-12 11:37:45 -08:00
biniam 4525e677fb chore: update file list for apidocs 2018-11-12 11:36:48 -08:00
Raymond Feng 6dbb357846 3.26.1
* [ BUGFIX ] maxDepthOfQuery config (leon3s)
2018-11-08 07:17:46 -08:00
leon3s b4c9cb5e99 [ BUGFIX ] maxDepthOfQuery config 2018-11-08 07:16:45 -08:00
Raymond Feng 0cd6615803 3.26.0
* Allow configuration of maxDepthOfQuery (Raymond Feng)
2018-10-31 09:13:15 -07:00
Raymond Feng 41d5f20fff Allow configuration of maxDepthOfQuery
https://github.com/strongloop/loopback-datasource-juggler/issues/1651
2018-10-31 09:12:43 -07:00
Raymond Feng b4d0cf54a8 3.25.2
* Check composite keys containing hidden props (Raymond Feng)
 * Improve hidden/protected property checks (Raymond Feng)
2018-10-29 13:12:23 -07:00
Raymond Feng 828fa3bcb6 Check composite keys containing hidden props 2018-10-29 13:11:50 -07:00
Raymond Feng aeee32294f Improve hidden/protected property checks
- Fixes #1645
  - do not apply hidden property check for data
- Fixes #1648
  - allow prohibitHiddenPropertiesInQuery to be set in model/ds
2018-10-29 13:11:39 -07:00
Raymond Feng d3efc40a37 3.25.1
* Allow hidden/protected props as an object (Raymond Feng)
2018-10-27 07:56:12 -07:00
Raymond Feng 2fa5affd12 Allow hidden/protected props as an object
Fixes #1646
2018-10-27 07:55:17 -07:00
Raymond Feng 2105c22ab1 3.25.0
* Ren handleUndefined to normalizeUndefinedInQuery (Raymond Feng)
 * Report circular or deep query objects (Raymond Feng)
 * Hide offending properties from the error object (Raymond Feng)
 * Tidy up extended operator check (Raymond Feng)
 * Prevent hidden/protected props from being searched (Raymond Feng)
 * Report errors for missing id props for include (Raymond Feng)
 * remove null in embedded doc properties updates (Dimitris)
2018-10-26 09:26:02 -07:00
Raymond Feng 63f0fe20ed Ren handleUndefined to normalizeUndefinedInQuery 2018-10-26 09:23:10 -07:00
Raymond Feng 89bb3079bd Report circular or deep query objects 2018-10-26 09:23:01 -07:00
Raymond Feng 71f2e54de5 Hide offending properties from the error object 2018-10-26 09:19:36 -07:00
Raymond Feng bae60d1c08 Tidy up extended operator check 2018-10-26 09:18:44 -07:00
Raymond Feng 71f1259e72 Prevent hidden/protected props from being searched
- report errors if where contains hidden properties
- report errors if incldue scope contains hidden or protected properties
2018-10-26 09:18:25 -07:00
Raymond Feng 97f631bd9c Report errors for missing id props for include
https://github.com/strongloop/loopback/issues/4028
2018-10-26 09:15:50 -07:00