InstantSet

Hi. I inherited a project that uses gorm v1, and we would like to upgrade to gorm v2. In the code, db.InstantSet() is used in multiple places, but that function doesn't exist in gorm v2. I see Set() and InstanceSet(), which have slightly different implementations. Are either of these a direct replacement for InstantSet(), or something else?

In the existing code, the values are read by post-commit hooks.

API or migration guide

Upgrading

Comment From: robhafner

We would also like further clarification on the difference between Set/Get and InstanceSet/InstanceGet as we are seeing behavior in which a one-to-many association doesn't propagate the value set via InstanceSet to the hook of the many side. It's unclear to us if this is a bug or the intended behavior based on the doc found here:

https://gorm.io/docs/settings.html