2
I made two tables, Usuario
1 : N Produto
I made an Inner Join with Typeorm, but an empty array was coming, so I took the query it was generating to analyze it better. When I played the query in Dbeaver worked perfectly, the data came right, however, only when I call for the application it comes empty, someone could help me??
Query generated when using getQuery()
SELECT "Produto"."nome", "usuario"."nome" FROM "tb_produto" "Produto" INNER JOIN "tb_usuario" "usuario" ON "usuario"."id" = "Produto"."id_usuario"
Query that comes with the empty array in the application
const produtos = await createQueryBuilder(Produto)
.innerJoinAndSelect('tb_usuario', 'usuario','usuario.id = Produto.id_usuario')
.select('Produto.nome, usuario.nome')
.getMany();