loopback-datasource-juggler/test
Miroslav Bajtoš e45292de08
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 fixing DAO operations like `find` and
`findOrCreate` so that they do NOT apply default property values on
data returned by the database (connector).

Please note that most of the other CRUD methods were already not
applying default values on database data as long as the connector
provided native implementation of the operation.
2019-04-04 09:47:31 +02:00
..
fixtures/loopback-connector-throwing Fix datasource to report connector-loading errors 2017-02-03 20:29:11 +01:00
helpers autofix eslint errors 2018-12-07 16:46:15 +01:00
kvao autofix eslint errors 2018-12-07 16:46:15 +01:00
operation-hooks.suite autofix eslint errors 2018-12-07 16:46:15 +01:00
CustomTypeForeignKey.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
allow-extended-operators.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
async-observer.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
basic-querying.test.js Do not apply default values on data from database 2019-04-04 09:47:31 +02:00
common.batch.js Fix manually 2016-08-22 19:20:12 -04:00
common_test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
crud-with-options.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
datasource.test.js manually fix remaining problems 2018-12-07 16:46:15 +01:00
datatype.test.js feat: Support "type" key in sub-properties 2019-02-21 13:58:34 +05:30
date-string.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
default-scope.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
defaults.test.js Do not apply default values on data from database 2019-04-04 09:47:31 +02:00
discovery.test.js manually fix remaining problems 2018-12-07 16:46:15 +01:00
exclude-base-props.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
geo.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
hooks.test.js manually fix remaining problems 2018-12-07 16:46:15 +01:00
include.test.js fix: use existing field in exclude test 2019-01-16 13:24:27 -05:00
include_util.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
init.js autofix eslint errors 2018-12-07 16:46:15 +01:00
introspection.test.js feat: support array within array 2019-03-07 15:58:26 +05:30
json.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
kv-memory.js autofix eslint errors 2018-12-07 16:46:15 +01:00
kvao.suite.js autofix eslint errors 2018-12-07 16:46:15 +01:00
list.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
loopback-data.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
loopback-dl.test.js manually fix remaining problems 2018-12-07 16:46:15 +01:00
manipulation.test.js Do not apply default values on data from database 2019-04-04 09:47:31 +02:00
memory.test.js manually fix remaining problems 2018-12-07 16:46:15 +01:00
mixins.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
mocha.opts Configure Mocha to use dot reporter 2018-07-10 12:11:46 +02:00
mock-connectors.js Fix manually 2016-08-22 19:20:12 -04:00
model-builder.test.js Support nested properties with class type 2019-01-25 10:05:36 +01:00
model-definition.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
model-inheritance.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
normalize-undefined.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
optional-validation.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
performance.coffee Reformat the code 2014-01-24 09:09:53 -08:00
persistence-hooks.suite.js manually fix remaining problems 2018-12-07 16:46:15 +01:00
relations.test.js manually fix remaining problems 2018-12-07 16:46:15 +01:00
schema.test.js manually fix remaining problems 2018-12-07 16:46:15 +01:00
scope.test.js manually fix remaining problems 2018-12-07 16:46:15 +01:00
spec_helper.js autofix eslint errors 2018-12-07 16:46:15 +01:00
test1-schemas.json Reformat the code 2014-01-24 09:09:53 -08:00
test2-schemas.json Reformat the code 2014-01-24 09:09:53 -08:00
transaction.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
transient.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
util.test.js autofix eslint errors 2018-12-07 16:46:15 +01:00
validations.test.js manually fix remaining problems 2018-12-07 16:46:15 +01:00