-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
bugIt is confirmed a bug, but don't worry, we'll handle it.It is confirmed a bug, but don't worry, we'll handle it.doneThis issue is done, which may be release in next version.This issue is done, which may be release in next version.
Description
Go version
1.21.12
GoFrame version
v2.7.2
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
Snippet: dao.XXX.GetDB(ctx).Where("id", id).FieldsEx("updated_at").Update(XXXObj);
What did you see happen?
This operation will continue to update the updated_at
field with value of object. Is this behavior what the designer intended? I suspect it might not be, and I also don't think it's a good idea. Because this behavior is certainly an unexpected for developer. All right, i have to query docs to find a reasonable
statement from administrtor, this is not a good experience.
Note that the Unscope
API is not under discussion here.
What did you expect to see?
If developer called FieldsEx API to exclude updated_at
fields or any other, which all should not be continue to controll with select/save/update operation.
gqcn
Metadata
Metadata
Assignees
Labels
bugIt is confirmed a bug, but don't worry, we'll handle it.It is confirmed a bug, but don't worry, we'll handle it.doneThis issue is done, which may be release in next version.This issue is done, which may be release in next version.