I am new using Go, but I would like to know if there is a problem if I add new attributes to a Collection in Mongo, once my model is defined in Go. Form example
I defined in Go this Model:
type material struct { ID string `bson:"_id" json:"_id"` Name string `bson:"name" json:"name"` Entity string `bson:"entity" json:"entity"` }
and I create new attributes on Material Collection for example:
Collection Material
All Attributes: ID, Name, Entity,Country(NEW ONE)
Is it necessary to update the model knowing that I will not use that attribute for the project?
https://stackoverflow.com/questions/66997201/go-mongo-problems April 08, 2021 at 12:06PM
没有评论:
发表评论