func (m *GormIdentityRepository) Delete(ctx context.Context, id uuid.UUID) error {
	defer goa.MeasureSince([]string{"goa", "db", "identity", "delete"}, time.Now())

	obj := Identity{ID: id}
	db := m.db.Delete(obj)

	if db.Error != nil {
		log.Error(ctx, map[string]interface{}{
			"identity_id": id,
			"err":         db.Error,
		}, "unable to delete the identity")
		return errors.WithStack(db.Error)
	}
	if db.RowsAffected == 0 {
		return errs.NewNotFoundError("identity", id.String())
	}

	log.Debug(ctx, map[string]interface{}{
		"identity_id": id,
	}, "Identity deleted!")

	return nil
}
// Delete removes a single record.
Delete removes a single record.
// Delete removes a single record .
func (m *GormIdentityRepository) Delete(ctx context.Context, id uuid.UUID) error {
	defer goa.MeasureSince([]string{"goa", "db", "identity", "delete"}, time.Now())
	obj := Identity{ID: id}
	db := m.db.Delete(obj)
	if db.Error != nil {
		log.Error(ctx, map[string]interface{}{
			"identity_id": id,
			"err":         db.Error,
		}, "unable to delete the identity")
		return errors.WithStack(db.Error)
	}
	if db.RowsAffected == 0 {
		return errs.NewNotFoundError("identity", id.String())
	}
	log.Debug(ctx, map[string]interface{}{
		"identity_id": id,
	}, "Identity deleted!")
	return nil
}
func ( m * GormIdentityRepository ) Delete ( ctx context . Context , id uuid . UUID ) error { defer goa . MeasureSince ( [ ] string { " " , " " , " " , " " } , time . Now ( ) ) obj := Identity { ID : id } db := m . db . Delete ( obj ) if db . Error != nil { log . Error ( ctx , map [ string ] interface { } { " " : id , " " : db . Error , } , " " ) return errors . WithStack ( db . Error ) } if db . RowsAffected == 0 { return errs . NewNotFoundError ( " " , id . String ( ) ) } log . Debug ( ctx , map [ string ] interface { } { " " : id , } , " " ) return nil }
Delete removes a single record.
Delete removes a single record .