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

strongloop / loopback-datasource-juggler / 5367
85%
master: 85%

Build:
Build:
LAST BUILD BRANCH: fix-deprecated-pkgs
DEFAULT BRANCH: master
Ran 26 Jul 2019 07:01AM 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
5367

Pull #1763

travis-ci

web-flow
Fix coercion of PK value in `replaceById` method

Before this change, when both the PK value (`id`) and the `data` object
were provided as plain-data values (e.g. as received in a JSON request),
and the connector was using a complex PK type (e.g. `ObjectID`
in MongoDB), then `replaceById` operation was printing confusing
warnings:

    WARNING: id property cannot be changed from 5d39775a59f5f541513c5e05
        to 5d39775a59f5f541513c5e05 for model:Post
        in 'before save' operation hook

    WARNING: id property cannot be changed from 5d39775a59f5f541513c5e05
        to 5d39775a59f5f541513c5e05 for model:Post
        in 'loaded' operation hook

This commit fixes the problem by applying the same type coercion on the
PK value (`id`) as has been applied by the model constructor on the PK
property (`data.id`).

Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
Pull Request #1763: Fix coercion of PK value in `replaceById` method

4491 of 5608 branches covered (80.08%)

Branch coverage included in aggregate %.

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

7090 of 8082 relevant lines covered (87.73%)

2774.31 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5367.1 26 Jul 2019 07:01AM UTC 0
84.59
Travis Job 5367.1
2 5367.2 26 Jul 2019 07:01AM UTC 0
84.59
Travis Job 5367.2
3 5367.3 26 Jul 2019 07:02AM UTC 0
84.59
Travis Job 5367.3
Source Files on build 5367
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #5367
  • Pull Request #1763
  • PR Base - master (#5365)
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