【问题标题】:how to set model extend in models.json?如何在models.json中设置模型扩展?
【发布时间】:2014-05-11 18:31:15
【问题描述】:

我在我的 models.json 中使用了新的环回:

"customer": { "options": { "extend": "User" }, "properties": {} }

但经过运行和探索,客户模型不是扩展用户。

【问题讨论】:

    标签: strongloop loopbackjs


    【解决方案1】:

    应该使用“base”而不是“extend”。见docs

    "user": {
      "options": {
        "base": "User",
     },
     "properties": {}
    }
    

    我们可以考虑同时支持“base”和“extend”。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-01-16
    • 1970-01-01
    • 2016-09-06
    • 1970-01-01
    • 2020-06-26
    • 2016-09-30
    • 2013-11-10
    • 2018-05-11
    相关资源
    最近更新 更多