java - Selma 使用 IgnoreNullValue 字段类型从 Dto 更新实体的问题 Date
问题描述
我正在使用 Selma 将我的对象从 Dto 映射到实体,包括从 Dto 更新实体,当我将 (withIgnoreNullValue = true) 添加到我的映射器时,我不知道他为什么不忽略字段类型日期的空值。当我检查我的生成类映射器时,我发现了这个
if (inDto.getStartDate() != null) {
out.setStartDate(new java.util.Date(inDto.getStartDate().getTime()));
}
else {
out.setStartDate(null);
}
解决方案
推荐阅读
- flutter - Flutter 函数的默认值
- sql-server - [SSISDB].[internal].[executable_statistics] 为空
- c# - 如何根据另一个函数打破一个函数中的 for 循环
- c++ - 获取对 std::exception_ptr 持有的 std::exception 的引用
- latex - Latex 定义上市语言
- javascript - 使用对象道具(名称)对js对象进行排序
- python - 如何更新字典列表中的值
- python - 在 Python 中手动计算 XGBoost 模型的概率
- monitor - 如何使用另一个 jar 检查我的 jar 是否仍在 Windows 10 中运行?
- android - 为什么我的文本和按钮不显示并被我的图像覆盖?