Skip to content

Conversation

@hejiangda
Copy link
Contributor

In finder/finder.go I convert the f.updates from bson.D to bson.M to make it avaiable for beforeUpdate function in internal/hook/field/strategy.go

@chenmingyong0423
Copy link
Owner

name: "find by name and update age" 测试用例里面, after 函数需要调整:在删除数据之前,需要先查询一下,然后判断 updated_at 字段不是零值,也就是它已经被修改了。

@chenmingyong0423
Copy link
Owner

name: "find by name and update age" 测试用例里面, after 函数需要调整:在删除数据之前,需要先查询一下,然后判断 updated_at 字段不是零值,也就是它已经被修改了。

另外,对于正常的 afterHook 测试用例,也要判断 updated_at 不是零值。

@chenmingyong0423 chenmingyong0423 added the bug Something isn't working label Feb 25, 2025
@chenmingyong0423 chenmingyong0423 merged commit 77e8d6a into chenmingyong0423:main Feb 27, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants