loopback
loopback copied to clipboard
The word 'template' can not be used in model name
Description/Steps to reproduce
I have a model called DetailsTemplate. This model is an "embedsMany" of another model and so is defined as follows in model-config.json:
"DetailsTemplate": {
"dataSource": "transient",
"public": false
},
It also has the accompanying .js and .json files:
- details-template.js
- details-template.json
Expected result
When Loopback starts, the details-type.js file should be called/loaded just like all the other .js files in the /common/models/ folder. It is not. I set a breakpoint and the breakpoint is never hit.
Additional information
When I change the name of the model to DetailsTemplatee (with an additional 'e' at the end) everything works file. The details-templatee.js file is called and code runs normally. Breakpoint hit when starting the application.
It leads me to believe the word 'template' is reserved in loopback.
Loopback version 2.38.3