Inheriting models depends on filename
See original GitHub issueI have the following models:
models/Repair.js
models/Maintenance.js
models/Service.js
and want Maintenance and Repair to inherit Service:
Maintenance.js
...
var Maintenance = new keystone.List('Maintenance', {
inherits: keystone.list('Service'),
});
...
but I get the following error:
ReferenceError: Unknown keystone list "Service"
If I change the name of Service.js
to AAService.js
, it works fine.
Is there any way to remove the alphabetic dependency for inherits:
, e.g., to specify a List/model
creation order?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Inheritance of a class depending on another inherited class
I'm modeling an Epub book. An Epub is basically a .zip file containing .html documents as the chapters. so that is the structure...
Read more >Inherit Model File Name/Use drawing model file na...
In Windchill and Creo 6 it is possible use auto-numbering for Parts and Assemblies but having the Drawing use the number/filename of is ......
Read more >SQL models - dbt Developer Hub
The model name is inherited from the filename. Models can be nested in subdirectories within the models directory. When you execute the dbt...
Read more >Manage DTDL models - Azure Digital Twins | Microsoft Learn
The RetrieveModelWithDependencies call returns not only the requested model, but also all models that the requested model depends on. Models ...
Read more >Writing two models toghether, in the same module, shows me ...
I am writing this code: class my_class_a(models. ... two models toghether, in the same module, shows me a key error "account.invoice" (inherited model) ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@morenoh149 there’s a lot of info here that probably should be documented. Perhaps create a doc issue to handle it.
@webteckie so do we need to document this implementation detail? no way to fix this right?