loopbackio / loopbackio/loopback-next
Custom repository collection/table name
- 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](https://github.com/strongloop/loopback-next/issues/2197), probably code related.
Contributor guide
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