diff --git a/executors.go b/executors.go index 2d4443bc..dfda8ebc 100644 --- a/executors.go +++ b/executors.go @@ -274,7 +274,7 @@ func (c *Connection) Create(model interface{}, excludeColumns ...string) error { return c.Create(m.Value) } - exists, errE := Q(c).Where("id = ?", id).Exists(i) + exists, errE := Q(c).Where(m.WhereID(), id).Exists(i) if errE != nil || !exists { return c.Create(m.Value) }