fix(todo): document issue with GormResult.LastInsertId() not returning correct ID
Some checks failed
Build , Vet Test, and Lint / Run Vet Tests (1.24.x) (push) Successful in -32m18s
Build , Vet Test, and Lint / Run Vet Tests (1.23.x) (push) Successful in -31m19s
Build , Vet Test, and Lint / Lint Code (push) Successful in -31m5s
Build , Vet Test, and Lint / Build (push) Successful in -31m53s
Tests / Integration Tests (push) Failing after -32m52s
Tests / Unit Tests (push) Successful in -32m36s

This commit is contained in:
2026-05-05 09:52:31 +02:00
parent fb051b5577
commit 157788b73b

View File

@@ -92,6 +92,7 @@ See [`resolvespec-python/todo.md`](./resolvespec-python/todo.md) for detailed Py
- [ ] Long preload alias names may exceed PostgreSQL identifier limit
- [ ] Some edge cases in computed column handling
- [ ] `GormResult.LastInsertId()` (`pkg/common/adapters/database/gorm.go:936`) always returns `0, nil` — GORM does not expose last insert ID via `sql.Result` for most dialects. Auto-generated IDs from GORM inserts are not propagated back through `LastInsertId`, which breaks the ID-retrieval path in `recursive_crud.go`. Fix: read the ID back from the model struct after `Create()` using reflection, or use GORM's `Statement.LastInsertId`.
---