// SetRelationModel implements mapping.SingleRelationer interface.
SetRelationModel implements mapping.SingleRelationer interface.
// SetRelationModel implements mapping . SingleRelationer interface .
func (c *Comment) SetRelationModel(relation *mapping.StructField, model mapping.Model) error {
	switch relation.Index[0] {
	case 2: 
		if model == nil {
			c.Post = nil
			return nil
		} else if post, ok := model.(*Post); ok {
			c.Post = post
			return nil
		}
		return errors.Wrapf(mapping.ErrInvalidRelationValue, "provided invalid model value: '%T' for relation Post", model)
	default:
		return errors.Wrapf(mapping.ErrInvalidRelationField, "provided invalid relation: '%s' for model: '%T'", relation, c)
	}
}
func ( c * Comment ) SetRelationModel ( relation * mapping . StructField , model mapping . Model ) error { switch relation . Index [ 0 ] { case 2 : if model == nil { c . Post = nil return nil } else if post , ok := model . ( * Post ) ; ok { c . Post = post return nil } return errors . Wrapf ( mapping . ErrInvalidRelationValue , " " , model ) default : return errors . Wrapf ( mapping . ErrInvalidRelationField , " " , relation , c ) } }
SetRelationModel implements mapping.SingleRelationer interface.
SetRelationModel implements mapping . SingleRelationer interface .
// Post