Mingyong Chen
Results
42
comments of
Mingyong Chen
> 在更新操作时,会进行一次预先序列化为 bson.M ,这是出于什么考虑? 转成 bson.M 是为了方便注入 `id`, `createdAt` 等时间字段的值,如果符合规则,就会自动填充 ID,创建和更新时间字段。 看起来问题出现在了 `dToM` 函数,只需要优化一下这个函数,能触发结构体底层的自定义序列化方法,就能解决问题。方便提供一下代码中涉及到的 **时间结构体** `carbon.Carbon` 吗,如果可以,顺便带上自定义的序列化方法。
> RunAutoTransaction RunManualTransaction @codepzj Thank you for your suggestion! I think your proposed names, `RunAutoTransaction` and `RunManualTransaction`, do make the distinction between the two methods more explicit. However, from a...