loopbackio / loopbackio/loopback-next

Documentation explaining Multiple Repositories design decision

Open
#2,110 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Docs good first issue help wanted
Dominant language
TypeScript
Stars
5.1k
Forks
1.1k
Avg merge
2d 21h
Merged PRs (30d)
27

Description

## Feature proposal

Starting to play/understand lb4 ...

I am writing code that inserts several model/entity instances into a DB. My code constantly needs to create repository instances based on the model in question. It seems overkill.

Can you explain in the documentation why this design decision to have one repository per class/model/entity was chosen? Or is it possible to have a multi-class repository? The `cli` does not seem to allow it.

Thanks.

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

Review the existing documentation and the CLI entry points related to repositories, models, and entities. Determine whether the one-repository-per-class design is intentional and whether multi-class repositories are supported. Done means documenting the design rationale and clearly answering the multi-class repository question.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
backend-api-design, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.