错误信息:
node_modules\mongoose\lib\schema.js:430
throw new Error('`' + path + '` may not be used as a schema pathname');
^
Error: `collection` may not be used as a schema pathname
原因:
在设计Schema时有一个字段,用了‘collection’,写在‘collections’即可。
错误信息:
node_modules\mongoose\lib\schema.js:430
throw new Error('`' + path + '` may not be used as a schema pathname');
^
Error: `collection` may not be used as a schema pathname
原因:
在设计Schema时有一个字段,用了‘collection’,写在‘collections’即可。