func (m *GormIdentityRepository) Save(ctx context.Context, model *Identity) error {
	defer goa.MeasureSince([]string{"goa", "db", "identity", "save"}, time.Now())

	obj, err := m.Load(ctx, model.ID)
	if err != nil {
		log.Error(ctx, map[string]interface{}{
			"identity_id": model.ID,
			"ctx":         ctx,
			"err":         err,
		}, "unable to update the identity")
		return errors.WithStack(err)
	}
	err = m.db.Model(obj).Updates(model).Error

	log.Debug(ctx, map[string]interface{}{
		"identity_id": model.ID,
	}, "Identity saved!")

	return errors.WithStack(err)
}
// Save modifies a single record.
Save modifies a single record.
// Save modifies a single record .
func (m *GormIdentityRepository) Save(ctx context.Context, model *Identity) error {
	defer goa.MeasureSince([]string{"goa", "db", "identity", "save"}, time.Now())
	obj, err := m.Load(ctx, model.ID)
	if err != nil {
		log.Error(ctx, map[string]interface{}{
			"identity_id": model.ID,
			"ctx":         ctx,
			"err":         err,
		}, "unable to update the identity")
		return errors.WithStack(err)
	}
	err = m.db.Model(obj).Updates(model).Error
	log.Debug(ctx, map[string]interface{}{
		"identity_id": model.ID,
	}, "Identity saved!")
	return errors.WithStack(err)
}
func ( m * GormIdentityRepository ) Save ( ctx context . Context , model * Identity ) error { defer goa . MeasureSince ( [ ] string { " " , " " , " " , " " } , time . Now ( ) ) obj , err := m . Load ( ctx , model . ID ) if err != nil { log . Error ( ctx , map [ string ] interface { } { " " : model . ID , " " : ctx , " " : err , } , " " ) return errors . WithStack ( err ) } err = m . db . Model ( obj ) . Updates ( model ) . Error log . Debug ( ctx , map [ string ] interface { } { " " : model . ID , } , " " ) return errors . WithStack ( err ) }
Save modifies a single record.
Save modifies a single record .