我得到以下错误:
node_modules/mongoose/index.d.ts:1:1 - error TS6200: Definitions of the following identifiersconflict with those in another file: DocumentDefinition, FilterQuery, UpdateQuery, NativeError, Mongoose
我有一个高并发和并行的情况,希望_id字段由MongoDB创建,而不是由mongoose创建,这样我就可以使用_id字段中的以插入文档的顺序可靠地查询文档。
这个是可能的吗?现在我不知道如何使用mongoose做到这一点,因为用{_id: false}标记一个模式并尝试保存它会返回一个错误document must have an _id before saving。