bun
bun copied to clipboard
fix: Rare panic in indirectAsKey (model_table_has_many.go) when loading complex models
In model_table_has_many.go, the indirectAsKey method has a nil pointer bug. Calling reflect.TypeOf(v).Kind() if v is nil causes a panic.
Hi. It looks like the root cause here is an improper implementation of driver.Valuer. Could you elaborate on the circumstances under which this occurs?
Implementing a fix for this in the proposed way could inadvertently obscure issues and hinder the troubleshooting process for other incorrect driver.Valuer implementations down the line.