// AddRelationModel implements mapping.MultiRelationer interface.
AddRelationModel implements mapping.MultiRelationer interface.
// AddRelationModel implements mapping . MultiRelationer interface .
func (p *Post) AddRelationModel(relation *mapping.StructField, model mapping.Model) error {
	switch relation.Index[0] {
	case 6: 
		comment, ok := model.(*Comment)
		if !ok {
			return errors.Wrapf(mapping.ErrInvalidRelationValue, "provided invalid value type: '%T'  for the field: 'Comments'", model)
		}
		p.Comments = append(p.Comments, comment)
	default:
		return errors.Wrapf(mapping.ErrInvalidRelationField, "provided invalid relation: '%T' for the model 'Post'", model)
	}
	return nil
}
func ( p * Post ) AddRelationModel ( relation * mapping . StructField , model mapping . Model ) error { switch relation . Index [ 0 ] { case 6 : comment , ok := model . ( * Comment ) if ! ok { return errors . Wrapf ( mapping . ErrInvalidRelationValue , " " , model ) } p . Comments = append ( p . Comments , comment ) default : return errors . Wrapf ( mapping . ErrInvalidRelationField , " " , model ) } return nil }
AddRelationModel implements mapping.MultiRelationer interface.
AddRelationModel implements mapping . MultiRelationer interface .
// Comments