upsert directly calls create if id column is not specified
Offen
- Vorherrschende Sprache
- JavaScript
- Sterne
- 2k
- Forks
- 238
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, mongodb, mysql, nodejs, postgresql, redis, sqlite
- Bereich
- backend, database
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100