0
votes

I'm using GORM for mapping MySQL DB tables which may have extra columns that are not part of the GORM models for them.

Selecting any row form such a table crashes because GORM emits a SELECT * FROM ... query and tries to scan the results in the model struct which is obviously impossible because there are more returned columns than expected.

Is there a way to force GORM to explicitly name the columns in the emitted SELECT queries?

1

1 Answers

0
votes

Looking at the source code, it does not seem like it is possible.