Skip to content

Sub classes do not inherit methods defined in models/*.js / models.json #324

Description

@ritch

/to @raymondfeng@bajtos

Consider this example:

// models.json{MyBaseModel: {},SubModel: {options: {base: "MyBaseModel"}}}

With methods defined in the base model like this:

// models/my-base-model.jsvarMyBaseModel=require('../app').models.MyBaseModel;MyBaseModel.myMethod=function(){}

...and finally somewhere else

// some-other-file.jsrequire('./app.js').models.SubModel.myMethod()// throws undefined is not a function

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions