Closed
Description
GORM Playground Link
Description
I encountered a race, similar to what was reported in #3595.
I might have misunderstood the documentation, but it seems to me that my example from the playground pull request should be the same as the first example from the documentation, demonstrating what should be a safe way of using a DB instance from multiple goroutines.
https://gorm.io/docs/method_chaining.html#Method-Chain-Safety-Goroutine-Safety
db, err := gorm.Open(sqlite.Open("test.db"), &gorm.Config{})
// Safe for new initialized *gorm.DB
for i := 0; i < 100; i++ {
go db.Where(...).First(&user)
}