修复search问题

This commit is contained in:
2024-11-13 14:53:21 +08:00
parent 72e4025f89
commit ab3cc1aeea
2 changed files with 2 additions and 2 deletions

View File

@ -692,7 +692,7 @@ export class SelectBuilder<E extends BasicEntity> extends WithGroup(WithJoin(Wit
if (!this.#whereCache) {
const result = [...this.wheres];
this.joinners.forEach(j => result.push(...j.__wheres__));
if (this.ctx.searchs.length) result.push(this.ctx.searchs.join(" or "))
if (this.ctx.searchs.length) result.push("(" + this.ctx.searchs.join(" or ") + ")")
this.#whereCache = result.join(" and ");
}
return this.#whereCache;