• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

strongloop / loopback-datasource-juggler / 5087
84%
master: 85%

Build:
Build:
LAST BUILD BRANCH: fix-deprecated-pkgs
DEFAULT BRANCH: master
Ran 09 Apr 2019 11:05AM UTC
Jobs 3
Files 36
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
5087

Pull #1705

travis-ci

web-flow
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.
Pull Request #1705: Do not apply default values on data from database [3.x]

4383 of 5519 branches covered (79.42%)

Branch coverage included in aggregate %.

6 of 6 new or added lines in 1 file covered. (100.0%)

6966 of 8004 relevant lines covered (87.03%)

2780.11 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5087.1 09 Apr 2019 11:05AM UTC 0
83.92
Travis Job 5087.1
2 5087.2 09 Apr 2019 11:05AM UTC 0
83.92
Travis Job 5087.2
3 5087.3 09 Apr 2019 11:07AM UTC 0
83.92
Travis Job 5087.3
Source Files on build 5087
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #5087
  • Pull Request #1705
  • PR Base - 3.x (#5047)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc