Your Question
I want to have more granular control of my migrations, so I'm writing separate sql files and I run those through gorm. The question I have is whether I can access these tables created this way (adding, updating, deleting rows) using gorm. I've created a matching model class that I verified matches the sql (I ran the auto migrate to see what it would produce with the model for testing this out). When I go to test the table out I get the following error: panic: reflect: reflect.Value.Set using unaddressable value when attempting to a new row to the table. Now I'm not sure if this is a bug and if it is I'll put in a full issue report with reproducible steps. Before that, I wanted to verify this was something that was possible with the library.
The document you expected this should be explained
https://gorm.io/docs/sql_builder.html#Raw-SQL
Expected answer
Whether this is possible or not and if so what extra precautions need to be accounted for.
Comment From: SidusCaelum
I'm just stupid. Nothing was wrong. I was not checking against the error field.