upsert directly calls create if id column is not specified
Aperta
- Lingua principale
- JavaScript
- Stelle
- 2k
- Fork
- 238
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
There's cases where I would want to use upsert without the id column being specified. An example of this is having an auto_increment SQL column that has other unique indexes that are not id.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Look at the upsert implementation in the ORM's codebase, likely in a database adapter like mysql or postgres. Identify where the id column check occurs and how it falls back to create. Review the schema handling for auto_increment and unique indexes. Test with a model that has a non-id unique index to see the current behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, mongodb, mysql, nodejs, postgresql, redis, sqlite
- Ambito
- backend, database
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100