On Sat, Apr 7, 2012 at 15:08, Ruslan Mezentsev <rmib....@gmail.com> wrote:
> Hi, how to fix the error?
(...)
> rmib@rsunix ~/docs/develop/web $ ./bin/web
> ObjectIdHex("4f807e48c2be8935f5000001")
That's not the ObjectId it's complaining about. You have a second one
on Commentaries. Either initialize it, or use `bson:",omitempty"` in
the tag so that it's not sent.
--
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/plus
http://niemeyer.net/twitter
http://niemeyer.net/blog
-- I'm not absolutely sure of anything.
type User struct {
Id bson.ObjectId `json:"_id,omitempty"bson:"_id,omitempty"`
Name string `json:"name"bson:"name,omitempty"`
Surname string `json:"surname"bson:"surname,omitempty"`
ProfilePicture string `json:"profile_picture"bson:"profile_picture"`
Username string `json:"username,omitempty"bson:"username,omitempty"`
Email string `json:"email"bson:"email"`
Password string `json:"-"bson:"password,omitempty"`
}
--
You received this message because you are subscribed to the Google Groups "mgo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mgo-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.