// SetBSON implements the bson marshaling interface.
// This is used to transparently convert ID to MongoDBID as ObectID.
SetBSON implements the bson marshaling interface.
This is used to transparently convert ID to MongoDBID as ObectID.
// SetBSON implements the bson marshaling interface . // This is used to transparently convert ID to MongoDBID as ObectID .
func (o *Category) SetBSON(raw bson.Raw) error {
	if o == nil {
		return nil
	}
	s := &mongoAttributesCategory{}
	if err := raw.Unmarshal(s); err != nil {
		return err
	}
	o.ID = s.ID.Hex()
	o.Description = s.Description
	o.Name = s.Name
	return nil
}
func ( o * Category ) SetBSON ( raw bson . Raw ) error { if o == nil { return nil } s := & mongoAttributesCategory { } if err := raw . Unmarshal ( s ) ; err != nil { return err } o . ID = s . ID . Hex ( ) o . Description = s . Description o . Name = s . Name return nil }
SetBSON implements the bson marshaling interface.
SetBSON implements the bson marshaling interface .