Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: return inserted ids with models in createAll #247

Merged
merged 1 commit into from Nov 5, 2022

Conversation

samarpanB
Copy link
Contributor

@samarpanB samarpanB commented Nov 5, 2022

Signed-off-by: Samarpan Bhattacharya this.is.samy@gmail.com

Fixes an issue with newly introduced createAll() method where it was not returning all ids of inserted records. The format of the data returned was also wrong. Introduced a new base function getInsertedIds() which needs to be implemented by connectors if they use multi insert support. It is similar to getInsertedId().

See also #227 and loopbackio/loopback-next#3357

Checklist

  • DCO (Developer Certificate of Origin) signed in all commits
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • Commit messages are following our guidelines

Signed-off-by: Samarpan Bhattacharya <this.is.samy@gmail.com>
@coveralls
Copy link

coveralls commented Nov 5, 2022

Pull Request Test Coverage Report for Build 3401100679

  • 1 of 10 (10.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 58.264%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/sql.js 1 10 10.0%
Totals Coverage Status
Change from base Build 3398161402: -0.2%
Covered Lines: 694
Relevant Lines: 1127

💛 - Coveralls

1 similar comment
@coveralls
Copy link

Pull Request Test Coverage Report for Build 3401100679

  • 1 of 10 (10.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 58.264%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/sql.js 1 10 10.0%
Totals Coverage Status
Change from base Build 3398161402: -0.2%
Covered Lines: 694
Relevant Lines: 1127

💛 - Coveralls

@dhmlau dhmlau merged commit 4378620 into loopbackio:master Nov 5, 2022
@dhmlau
Copy link
Member

dhmlau commented Nov 5, 2022

@samarpanB, thanks for your contribution. Your PR has been merged! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants