Typeorm create tables based on selected entities
Currently, I am working on creating the database and then table structure based on all the available entity classes but I need to make the tables for some of the entities, not all the entities based on one condition for example if the institute ID is ‘xyz’ then create the database and table structure with all the available entities but if an institute is
‘abc’ then needs to create a database or table structure for only selected entities not for all.
Typeorm create tables based on selected entities
Currently, I am working on creating the database and then table structure based on all the available entity classes but I need to make the tables for some of the entities, not all the entities based on one condition for example if the institute ID is ‘xyz’ then create the database and table structure with all the available entities but if an institute is
‘abc’ then needs to create a database or table structure for only selected entities not for all.
Why do I get “Can’t add new command when connection is in closed state” error when using TypeORM with MySQL and createQueryBuilder?
I’m working on a Node.js project using TypeORM with MySQL. I’ve encountered an issue where I get the following error when trying to execute a query using createQueryBuilder:
Error: Can't add new command when connection is in closed state