我需要更改模型文件夹的结构。根据文档,我可以修改默认的json配置文件:
{
"_meta": {
"sources": [
"loopback/common/models/**/*",
"loopback/server/models/**/*",
"../common/models",
"./models"
],
"mixins": [
"loopback/common/mixins",
"loopback/server/mixins",
"../common/mixins",
"./mixins"
]
},
...
}
我一直在尝试更改为:
{
"_meta": {
"sources": [
"loopback/common/models/**/",
"loopback/server/models/**/*",
"../common/models",
"./models"
],
"mixins": [
"loopback/common/mixins",
"loopback/server/mixins",
"../common/mixins",
"./mixins"
]
},
...
}
但是当我加载项目时,出现了这个错误。
Error: Model not found:
如何更改模型的默认目录?
"loopback/common/models/**/*" -> "loopback/common/models/**/"
。 - pdenes