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