loopbackio / loopbackio/loopback-next
Custom repository collection/table name
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1.1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 27
Description
Currently the name of the collection is specified in the model, through the setting property of the model decorator.
I have two repositories, one storing the current version of the data, the other storing all versions of the data. Right now when I use the create method from those repo, they try to save into the same collection, creating errors.
I would like to store the model in different collections.
Also see this issue, probably code related.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the model decorator's setting property and the repository create method described in the issue, then review related issue #2197 for implementation context. The work is done when two repositories using the same model can persist to different collections or tables without conflicts, with appropriate coverage added wherever the existing behavior is tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100