Closed mwiley63 closed 6 years ago
Hi @mwiley63
Does it work if you change entities
in env.ts
to api/models/**/*{.js,.ts}
?
Cheers
Hi @dweber019
That worked! Can't believe I missed the env.ts file 👍
Thanks!
I'll change this to be more open in the future.
Hello,
What would be the recommended way to add sub directories to the models folder? When I do the following I get an error with typeorm (as the generated ormconfig.json does not include all the sub directories by default):
If I include a type from UserRole.ts into User.ts, I get an error, "Entity Metadata not found". After looking at the ormconfig.json, I can see that the user-details sub directory is not included into the entities array.
As a hack I hard-coded each entity directory into the ormconfgi.ts command file. Is there a better way to do this?
Thank you!