【发布时间】:2015-07-16 15:44:23
【问题描述】:
在我的 Sails 应用程序中,我按如下方式编辑 config/models.js 文件以在提升应用程序时清理数据库。
migrate: 'drop',
connection: 'mongodb'
但是当我尝试运行应用程序时,它会显示以下错误。
A hook (`orm`) failed to load!
error: Error (E_UNKNOWN) :: Encountered an unexpected error
MongoError: Index with name: _id_ already exists with different options
我正在使用sails 0.10.5版,任何形式的帮助都将不胜感激。
【问题讨论】: