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

strongloop / loopback-datasource-juggler / 5366
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 22s
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
5366

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.36 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5366.1 26 Jul 2019 07:01AM UTC 0
84.57
Travis Job 5366.1
2 5366.2 26 Jul 2019 07:01AM UTC 0
84.57
Travis Job 5366.2
3 5366.3 26 Jul 2019 07:01AM UTC 0
84.57
Travis Job 5366.3
Source Files on build 5366
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #5366
  • bb1cc70d on github
  • Prev Build on fix/PK-coercion-in-replaceById (#5363)
  • Next Build on fix/PK-coercion-in-replaceById (#5368)
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