Reputation: 2561
I am trying to set a default column value for a string column in beego struct.
I tried the following:
string `orm:"column(method_type);default(test)"`
And some different versions of this but instead of inserting the default value supplied, the orm keeps sending blank string to table.
Used this as reference: https://beego.me/docs/mvc/model/models.md#default
Upvotes: 0
Views: 694
Reputation: 207
Try this
string `orm:"column:method_type;default:'test'"`
Upvotes: 0