Skip to content

Commit

Permalink
fix: support postgres where placeholder #46
Browse files Browse the repository at this point in the history
  • Loading branch information
fifsky committed Aug 24, 2021
1 parent 239293d commit ba5bcb8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions relation.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ func RelationAll(wrapper *ModelWrapper, db *DB, data interface{}) error {
chainFn(m)
}

// TODO sqlx.In maybe not support postgres
err := m.Where(fmt.Sprintf("%s in(%s)", relations[1], m.dialect.Placeholder()), relVals).All()
if err != nil {
return err
Expand Down

0 comments on commit ba5bcb8

Please sign in to comment.