Closed ddehghan closed 5 years ago
[Nest] 83610 - 07/12/2019, 3:51 PM [ExceptionHandler] Nest can't resolve dependencies of the PhotoRepository (?). Please make sure that the argument at index [0] is available in the TypeOrmModule context. +2ms
@InjectRepository()
takes 2 arguments in which the second one is the name of the connection.
@InjectRepository(Photo, 'connection2')
I have the same case and i also had this issue using nest@6.5.2, nestjs/typeorm@6.1.3. Unfortunately solution by Kamil doesn't work for me.
any one knows how can i make the connections of typeorm, and knex the same? i.e when i use entities to get info from a table it return empty result
I'm submitting a...
Current behavior
it seems that you cant set 2 ORM models and name both of them. Uncommenting the name for the first one causes the error below.
setting the name property for one ORM also cause the same error.
Expected behavior
you should be able to have 2 database connection to sqlite.
Minimal reproduction of the problem with instructions
use use the 05-sql-typeorm example code and change the app module class to above.
Environment