// GetBSON implements the bson marshaling interface.
// This is used to transparently convert ID to MongoDBID as ObectID.
GetBSON implements the bson marshaling interface.
This is used to transparently convert ID to MongoDBID as ObectID.
// GetBSON implements the bson marshaling interface . // This is used to transparently convert ID to MongoDBID as ObectID .
func (o *SparseCategory) GetBSON() (interface{}, error) {
	if o == nil {
		return nil, nil
	}
	s := &mongoAttributesSparseCategory{}
	if o.ID != nil {
		s.ID = bson.ObjectIdHex(*o.ID)
	}
	if o.Description != nil {
		s.Description = o.Description
	}
	if o.Name != nil {
		s.Name = o.Name
	}
	return s, nil
}
func ( o * SparseCategory ) GetBSON ( ) ( interface { } , error ) { if o == nil { return nil , nil } s := & mongoAttributesSparseCategory { } if o . ID != nil { s . ID = bson . ObjectIdHex ( * o . ID ) } if o . Description != nil { s . Description = o . Description } if o . Name != nil { s . Name = o . Name } return s , nil }
GetBSON implements the bson marshaling interface.
GetBSON implements the bson marshaling interface .