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

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

Build:
Build:
LAST BUILD BRANCH: fix-deprecated-pkgs
DEFAULT BRANCH: master
Ran 25 Jul 2019 09:38AM UTC
Jobs 3
Files 36
Run time 14s
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
5363

push

travis-ci

bajtos
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>

4490 of 5608 branches covered (80.06%)

Branch coverage included in aggregate %.

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

7088 of 8082 relevant lines covered (87.7%)

2774.33 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5363.1 25 Jul 2019 09:39AM UTC 0
84.57
Travis Job 5363.1
2 5363.2 25 Jul 2019 09:38AM UTC 0
84.57
Travis Job 5363.2
3 5363.3 25 Jul 2019 09:38AM UTC 0
84.57
Travis Job 5363.3
Source Files on build 5363
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #5363
  • c1fb686b on github
  • Next Build on fix/PK-coercion-in-replaceById (#5366)
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