Browse Source

修改bug

yjp 1 năm trước cách đây
mục cha
commit
d2208e4885
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      operations/operations.go

+ 4 - 2
operations/operations.go

@@ -127,8 +127,10 @@ func (op *Operations) AutoMigrate(tables ...Table) error {
 }
 
 func (op *Operations) Table(name string, args ...any) DBOperations {
-	op.processDB = op.initDB.Table(name, args...)
-	return op
+	return &Operations{
+		initDB:    op.initDB,
+		processDB: op.initDB.Table(name, args...),
+	}
 }
 
 func (op *Operations) Raw(sql string, values ...any) DBOperations {