// GetRelationModelAt implements mapping.MultiRelationer interface.
GetRelationModelAt implements mapping.MultiRelationer interface.
// GetRelationModelAt implements mapping . MultiRelationer interface .
func (b *Blog) GetRelationModelAt(relation *mapping.StructField, index int) (models mapping.Model, err error) {
	switch relation.Index[0] {
	case 3: 
		if index > len(b.Posts)-1 {
			return nil, errors.Wrapf(mapping.ErrInvalidRelationIndex, "index out of possible range. Model: 'Blog', Field Posts")
		}
		return b.Posts[index], nil
	default:
		return nil, errors.Wrapf(mapping.ErrInvalidRelationField, "provided invalid relation: '%s' for model: '%T'", relation, b)
	}
	return models, nil
}
func ( b * Blog ) GetRelationModelAt ( relation * mapping . StructField , index int ) ( models mapping . Model , err error ) { switch relation . Index [ 0 ] { case 3 : if index > len ( b . Posts ) - 1 { return nil , errors . Wrapf ( mapping . ErrInvalidRelationIndex , " " ) } return b . Posts [ index ] , nil default : return nil , errors . Wrapf ( mapping . ErrInvalidRelationField , " " , relation , b ) } return models , nil }
GetRelationModelAt implements mapping.MultiRelationer interface.
GetRelationModelAt implements mapping . MultiRelationer interface .
// Posts