// SetPrimaryKeyStringValue implements mapping.Model interface method.
SetPrimaryKeyStringValue implements mapping.Model interface method.
// SetPrimaryKeyStringValue implements mapping . Model interface method .
func (b *Blog) ParseFieldsStringValue(field *mapping.StructField, value string) (interface{}, error) {
	switch field.Index[0] {
	case 0: 
		return strconv.ParseInt(value, 10, mapping.IntegerBitSize)
	case 1: 
		temp := b.CreatedAt
		if err := b.CreatedAt.UnmarshalText([]byte(value)); err != nil {
			return "", errors.Wrapf(mapping.ErrFieldValue, "invalid field 'CreatedAt' value: '%v' to parse string. Err: %v", b.CreatedAt, err)
		}
		bt, err := b.CreatedAt.MarshalText()
		if err != nil {
			return "", errors.Wrapf(mapping.ErrFieldValue, "invalid field 'CreatedAt' value: '%v' to parse string. Err: %v", b.CreatedAt, err)
		}
		b.CreatedAt = temp
		return string(bt), nil
	case 2: 
		return value, nil
	case 5: 
		return strconv.ParseInt(value, 10, mapping.IntegerBitSize)
	}
	return nil, errors.Wrapf(mapping.ErrInvalidModelField, "provided invalid field: '%s' for given model: Blog'", field.Name())
}
func ( b * Blog ) ParseFieldsStringValue ( field * mapping . StructField , value string ) ( interface { } , error ) { switch field . Index [ 0 ] { case 0 : return strconv . ParseInt ( value , 10 , mapping . IntegerBitSize ) case 1 : temp := b . CreatedAt if err := b . CreatedAt . UnmarshalText ( [ ] byte ( value ) ) ; err != nil { return " " , errors . Wrapf ( mapping . ErrFieldValue , " " , b . CreatedAt , err ) } bt , err := b . CreatedAt . MarshalText ( ) if err != nil { return " " , errors . Wrapf ( mapping . ErrFieldValue , " " , b . CreatedAt , err ) } b . CreatedAt = temp return string ( bt ) , nil case 2 : return value , nil case 5 : return strconv . ParseInt ( value , 10 , mapping . IntegerBitSize ) } return nil , errors . Wrapf ( mapping . ErrInvalidModelField , " " , field . Name ( ) ) }
SetPrimaryKeyStringValue implements mapping.Model interface method.
SetPrimaryKeyStringValue implements mapping . Model interface method .
// ID // CreatedAt // Title // TopPostID