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
多个嵌入的结构中,如果通过 clause.Associations 删除该model下全部的关联关系(包含一个 hasmany 和 一个many2many ) db.Select(clause.Associations).Delete(&TargetModel{}) 语句执行的删除sql 执行顺序不一致? 这个是预期的吗? 这会导致在使用sqlmock 这类工具的时候,偶发性的出现测试因为顺序问题不能通过。
clause.Associations
hasmany
many2many
db.Select(clause.Associations).Delete(&TargetModel{})
The text was updated successfully, but these errors were encountered:
看代码好像是, Relationships.Relations 存储的是map。 使用 * 或者 指定字段试试
*
Sorry, something went wrong.
jinzhu
No branches or pull requests
Your Question
多个嵌入的结构中,如果通过
clause.Associations
删除该model下全部的关联关系(包含一个hasmany
和 一个many2many
)db.Select(clause.Associations).Delete(&TargetModel{})
语句执行的删除sql 执行顺序不一致? 这个是预期的吗?这会导致在使用sqlmock 这类工具的时候,偶发性的出现测试因为顺序问题不能通过。
The document you expected this should be explained
Expected answer
The text was updated successfully, but these errors were encountered: