loopback icon indicating copy to clipboard operation
loopback copied to clipboard

Model name with underscore creates unexpected issue with standalone scripts

Open GrandmasterGrogu opened this issue 11 years ago • 2 comments

I have a few standalone scripts that a cron runs periodically.

I found out that I was unable to access models with an underscore, while others work.

var server = require('../server/server'); // To access models and database

console.log(server.models.project_category); // Model named with underscore is inaccessible
console.log(server.models.projectcategory); // Model named without underscore is accessible

GrandmasterGrogu avatar Jun 13 '15 19:06 GrandmasterGrogu

@alexxgathp Are you still running into issues? Can you provide a sample repo for me to reproduce the issue?

superkhau avatar Dec 15 '15 05:12 superkhau

I tested it today on a new project I have. Issue appears to be gone.

GrandmasterGrogu avatar Dec 31 '15 20:12 GrandmasterGrogu