loopbackio / loopbackio/loopback-datasource-juggler

allow empty array in createAll

Open
#2,409 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
JavaScript
Stars
282
Forks
366
Avg merge
17h 4m
Merged PRs (30d)
10

Description

Suggestion

Allow empty array in createAll method

Use Cases

Ass when we pass empty array in createAll within a transaction then it gives error and transaction fails, thus failing the whole operation.

error thrown is -> The data argument must be an array with length > 0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the createAll method and trace the validation that produces “The data argument must be an array with length > 0.” Check the transaction path described in the issue, and consider the work complete when an empty array can be passed without throwing or causing the transaction to fail.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.