You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the flow that I have in my backend, I get the data for the guests and the data for the model that ConfirmedGuests lives in. I first create all guests and put their bson.ObjectId's in a slice. then I wish to assign them to ConfirmedGuests. But since ConfirmedGuests is of type []interface{} and my guests slice is of type []bson.ObjectId I cannot assign them when creating the struct ConfirmedGuests lives in. Is there any way of assigning this through a clever cast or something ?
Regards, Duck
The text was updated successfully, but these errors were encountered:
currently i have a model that is as the following
In the flow that I have in my backend, I get the data for the guests and the data for the model that
ConfirmedGuests
lives in. I first create all guests and put theirbson.ObjectId
's in a slice. then I wish to assign them toConfirmedGuests
. But sinceConfirmedGuests
is of type[]interface{}
and my guests slice is of type[]bson.ObjectId
I cannot assign them when creating the structConfirmedGuests
lives in. Is there any way of assigning this through a clever cast or something ?Regards, Duck
The text was updated successfully, but these errors were encountered: