Nest: printSql() does not print out SQL at the console

Created on 15 May 2018  路  3Comments  路  Source: nestjs/nest

I'm submitting a...


[ ] Regression 
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior


@nestjs/typeorm
printSql() does not print out SQL at the console

Expected behavior


printSql() Print SQL from the console

Minimal reproduction of the problem with instructions


await this.photoRepository
    .createQueryBuilder()
    .select()
    .printSql()
    .getMany();

Environment


Nest version: 5.0.0

Most helpful comment

Maybe it's too late, but I had the same issue and it turns out that I forgot to enable the logging in "ormconfig.json":

"logging": true

Hope it's help.

All 3 comments

You should report this issue in the https://github.com/typeorm/typeorm repository.

Maybe it's too late, but I had the same issue and it turns out that I forgot to enable the logging in "ormconfig.json":

"logging": true

Hope it's help.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rlesniak picture rlesniak  路  3Comments

mishelashala picture mishelashala  路  3Comments

hackboy picture hackboy  路  3Comments

breitsmiley picture breitsmiley  路  3Comments

rafal-rudnicki picture rafal-rudnicki  路  3Comments