You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
alanhi
added
the
bug
It is confirmed a bug, but don't worry, we'll handle it.
label
Sep 2, 2024
Issues-translate-bot
changed the title
gdb: Safe与OmitEmptyWhere调用顺序导致OmitEmptyWhere失效
gdb: The order in which Safe and OmitEmptyWhere are called causes OmitEmptyWhere to fail.
Sep 2, 2024
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@alanhi The Safe mechanism will actually set the flag in Model, and all subsequent chain operations will determine whether to use shallow copy. I understand that your problem here is that you first modified the Model through a chain operation. At this time, the Model is already dirty, and it is meaningless to set Safe to the Model later. If you still have problems please submit a minimal working replica of the code.
Go version
go version go1.22.4 windows/amd64
GoFrame version
v2.7.2
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
What did you see happen?
.Safe(false).OmitEmptyWhere()
,sql中name条件存在.OmitEmptyWhere().Safe(false)
,sql中name条件不存在看起来是
.Safe(true).Where(xxx).Safe(false).OmitEmptyWhere()
这种形式会出现问题What did you expect to see?
fix
The text was updated successfully, but these errors were encountered: