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