我成功地从我的数据库中生成了所有模型.然后,我通过执行’node’来运行api. 我能够看到我的所有Web服务,但是当我尝试尝试服务时,有一个500错误告诉我没有ACL表. 所以,我打开了model-co
我能够看到我的所有Web服务,但是当我尝试尝试服务时,有一个500错误告诉我没有ACL表.
所以,我打开了model-config.json,我看到之前没有创建过4个模型(User,AccessToken,ACL,RoleMapping和Role).
我想知道我的数据库中是否存在所有这些模型.你知道我必须在每张桌子上放置哪些属性吗?
提前谢谢你.
Error:
{
"error": {
"name": "Error",
"status": 500,
"message": "ER_NO_SUCH_TABLE: Table 'sed.ACL' doesn't exist",
"code": "ER_NO_SUCH_TABLE",
"errno": 1146,
"sqlState": "42S02",
"index": 0,
"stack": "Error: ER_NO_SUCH_TABLE: Table 'sed.ACL' doesn't exist\n [...]"
}
}
您需要自己自动提供这些表.看到:
> https://groups.google.com/forum/#!searchin/loopbackjs/automigrate $20default $20tables / loopbackjs / IiapgVVf-NQ / 32yeCnNxBmIJ
> https://github.com/strongloop/loopback/issues/591.
