From 0369fa213c57582d26dac928df312835dc8ea293 Mon Sep 17 00:00:00 2001 From: demoManito <1430482733@qq.com> Date: Thu, 10 Oct 2024 16:12:40 +0800 Subject: [PATCH] fix --- finisher_api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/finisher_api.go b/finisher_api.go index 981270fea..ebb195f46 100644 --- a/finisher_api.go +++ b/finisher_api.go @@ -505,7 +505,7 @@ func (db *DB) Count(count *int64) (tx *DB) { // Exists checks if there is any record matching the given conditions func (db *DB) Exists() (bool, error) { var exist bool - return exist, db.getInstance(). + return exist, db.Session(&Session{NewDB: true}). Raw("SELECT ? AS exist", Expr("EXISTS(?)", db.Select("1"))). Pluck("exist", &exist).Error }