Skip to content

Commit

Permalink
log SQL for association query
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt authored and sio4 committed Apr 14, 2022
1 parent 2ff8b3f commit 091f062
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions executors.go
Expand Up @@ -297,6 +297,7 @@ func (c *Connection) Create(model interface{}, excludeColumns ...string) error {
for index := range stms {
statements := stms[index].Statements()
for _, stm := range statements {
log(logging.SQL, stm.Statement, stm.Args...)
if c.TX != nil {
_, err := c.TX.Exec(c.Dialect.TranslateSQL(stm.Statement), stm.Args...)
if err != nil {
Expand Down

0 comments on commit 091f062

Please sign in to comment.