We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
逻辑删除采用的是 0/1,A B表单表查询软删除都生效的
IsDeleted soft_delete.DeletedAt gorm:"column:is_deleted;softDelete:flag" json:"isDeleted" // 逻辑删除
IsDeleted soft_delete.DeletedAt
// 逻辑删除
联表的代码(现在联调右表被删除的字段也被查询出来了) qc := dao.Q.WithContext(d.ctx) qc.A.Join(dao.B, dao.B.DatasourceID.EqCol(dao.A.ID)).Where(conds...).Find()
qc := dao.Q.WithContext(d.ctx) qc.A.Join(dao.B, dao.B.DatasourceID.EqCol(dao.A.ID)).Where(conds...).Find()
并且 dao.DatasourcePermission.IsDeleted.Eq 需要传递是参数类型为 driver.Valuer 我现在不知道怎么创建 0/1 的driver.Valuer 变量
临时解决办法,把B表的 isDelete = A 表的 isDelete 并加入到 conds 中 dao.B.IsDeleted.EqCol(dao.A.IsDeleted)
dao.B.IsDeleted.EqCol(dao.A.IsDeleted)
请求各位设置右表 isDeleted = 0 或者默认让右表软删除字段生效
The text was updated successfully, but these errors were encountered:
tr1v3r
Successfully merging a pull request may close this issue.
逻辑删除采用的是 0/1,A B表单表查询软删除都生效的
IsDeleted soft_delete.DeletedAt
gorm:"column:is_deleted;softDelete:flag" json:"isDeleted"// 逻辑删除
联表的代码(现在联调右表被删除的字段也被查询出来了)
qc := dao.Q.WithContext(d.ctx) qc.A.Join(dao.B, dao.B.DatasourceID.EqCol(dao.A.ID)).Where(conds...).Find()
并且 dao.DatasourcePermission.IsDeleted.Eq 需要传递是参数类型为 driver.Valuer
我现在不知道怎么创建 0/1 的driver.Valuer 变量
临时解决办法,把B表的 isDelete = A 表的 isDelete 并加入到 conds 中
dao.B.IsDeleted.EqCol(dao.A.IsDeleted)
请求各位设置右表 isDeleted = 0 或者默认让右表软删除字段生效
The text was updated successfully, but these errors were encountered: