8000 Inheriting remote methods triggers deprecation warning about use of isStatic · Issue #3529 · strongloop/loopback · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Inheriting remote methods triggers deprecation warning about use of isStatic #3529
Closed
@lehni

Description

@lehni

Description/Steps to reproduce

  • Define two models of which one inherits from the other
  • Define a remote method in the base model (it doesn't matter wether it is static or not):

base-class.json

{
  "name": "BaseClass",
  "base": "Model",
  "methods": {
    "test": {}
  }
}

extending-class.json

{
  "name": "ExtendingClass",
  "base": "BaseClass"
}

When running the app, this deprecation warning appears:

strong-remoting deprecated Remoting metadata "isStatic" is deprecated. Please specify "prototype.name" in method name instead for isStatic=false

Expected result

No deprecation warning should be triggered

Additional information

Looking into what's causing this, it looks like Registry.prototype.createModel() / BaseClass.extend() is passing on BaseClass.settings.methods to ExtendingClass (merged with it with its own method definitions, which in this case here is none).

The problem is that Model.settings.methods is internally using the now deprecated notation with isStatic boolean values. So when they get passed on, the deprecation warning is triggered, although none of the app's own code is specifying isStatic anywhere.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0