-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
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
dao现在还不能设置 context,要如何安全的操作 #18
Comments
具体可以看看gorm的文档,应该不是gorm-plus的问题 |
应该是 db clone的问题,你的dao操作都是同一个db,如果修改了 db 其他的操作会有影响 |
哦哦,我理解你的意思了,我找个时间改一下,或者你有时间的话,也可以研究一下怎么改比较好,提个pr上来 |
期待函数签名 增加context |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如果获取 db设置 context再次设置到 dao,这会有问题
gplus.Init(dao.Db().WithContext(ctx))
接口操作
第一次不设置context save操作
第二次设置 context get操作
再次调用接口结果context canceled
The text was updated successfully, but these errors were encountered: