loopbackio / loopbackio/loopback-next

Custom repository collection/table name

Abierto
#2,844 6 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

feature good first issue Hacktoberfest Repository
Lenguaje dominante
TypeScript
Estrellas
5.1k
Forks
1.1k
Merge medio
2 d 21 h
PR fusionados (30 d)
27

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
typescript
Área
backend, database
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.