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 committed Jan 28, 2022
1 parent d148b95 commit 427f661
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 427f661

Please sign in to comment.