我正在浏览蒙古文档https://mongoid.github.io/old/en/mongoid/docs/querying.html
我不清楚first_or_create和first_or_create之间有什么区别!
有人能帮我理解吗?
发布于 2022-06-06 19:44:50
我想你可以看看
https://mongoid.github.io/old/en/mongoid/docs/persistence.html
create =将文档或多个文档插入数据库
create! =将文档或多个文档插入数据库,如果发生验证错误,将引发错误。
https://stackoverflow.com/questions/72521773
复制相似问题