I encountered this error (unsupported data type: &[]), and this may be the solution if you're facing the same problem. The error occurs because one of the models you're using has a field with a data type that GORM doesn't support for your database (e.g., Postgres, MySQL, etc.).
For example, this issue might happen in Postgres with a field like:
type Class struct {
Student []uint64 `gorm:"column:student_ids" json:"studentIds"`
}
Since Postgres doesn't support the array type []uint64 natively, you can resolve this by changing the field type to something that the database understands better, like text or json types.
Ensure all your model definitions are compatible with the database types to avoid such issues. You can run Migrate each struct to see which table has the problem.