Skip to content

不支持 soft_delete 么? #41

@edocevol

Description

@edocevol
type Model struct {
	IncrID int64 `gorm:"column:incr_id;primaryKey;autoIncrement"`
	Version optimisticlock.Version
	DeletedAt soft_delete.DeletedAt
}

执行 delete 报错

if err := tx.Where("id = ?", m.ID).Delete(&entity.Model{}).Error; err != nil {
	return err
}

错误类似于

 converting driver.Value type clause.Expr ("{`version`+1 [] false}") to a int64: invalid syntax

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions