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