Is it possible to determine/control the order of arguments when making a query using .Save()? I am utilizing GORM alongside sqlmock for testing, and one of my tests sporadically fails as it expects an insert statement's arguments to be in a particular order. Unfortunately, each time I execute an insert via .Save(), GORM seems to randomize the argument order.
The document you expected this should be explained
This issue has been automatically marked as stale because it has been open 360 days with no activity. Remove stale label or comment or this will be closed in 180 days
Your Question
Is it possible to determine/control the order of arguments when making a query using
.Save()
? I am utilizing GORM alongsidesqlmock
for testing, and one of my tests sporadically fails as it expects an insert statement's arguments to be in a particular order. Unfortunately, each time I execute an insert via.Save()
, GORM seems to randomize the argument order.The document you expected this should be explained
https://gorm.io/docs/update.html
Expected answer