Comments (16)
好像 修复过。是最新的hsweb-framework和 easyorm版本吗?
debug看看这里
from jetlinks-community.
hsweb-framework 版本:4.0.17-SNAPSHOT
easy-ormb 版本:4.1.2-SNAPSHOT
步骤:
1、update 前设置了 -1
2、EntityPrepareModifyEvent 事件中给更新前后的实体分别设置成了-2 和 -3
3、debug 看 entry.setValue 是塞成功了,取到了 -3
4、最终执行的 sql 是 -1
另外发现个现象:
第 1 步 update 前不塞值的话,只在第 2 步中塞值,第 4 步最终执行的 sql 不会有相关字段
from jetlinks-community.
在这个单元测试 复现看看
from jetlinks-community.
在这个代码仓库中复现了:https://github.com/MoonBottle/hsweb-framework
1、update 前赋值
2、监听事件并修改变量值
3、最终执行的 sql
from jetlinks-community.
试试这个PR hs-web/hsweb-framework#288
from jetlinks-community.
试试这个PR hs-web/hsweb-framework#288
from jetlinks-community.
但是今天又发现了一个新的现象,感觉似乎有点问题,步骤如下:
新增了一个 testColumn2
字段
1、使用 .setNull(EventTestEntity::getTestColumn2)
2、预期的 sql 是正常的执行了 setnull
3、但是在 EntityModifyEvent
中 after 对象的 testColumn2
字段值变成了 0,预期这里也是 null 值
测试代码还是在这个仓库中:https://github.com/MoonBottle/hsweb-framework
from jetlinks-community.
字段类型是包装器类型还是基本数据类型
我再看看..
from jetlinks-community.
再试试
from jetlinks-community.
不过目前不能通过EntityPrepareModifyEvent设置null值
from jetlinks-community.
不过目前不能通过EntityPrepareModifyEvent设置null值
抱歉,我有点没说清楚,现在这个现象和 EntityPrepareModifyEvent
没有关系了,是一个单独的问题
刚才又试了下,setNull 似乎不生效了,最终执行的 sql 中没有 set null 的语句
已确认刷新过 maven
from jetlinks-community.
from jetlinks-community.
奇怪,我本地确实不行,maven 也刷新了
from jetlinks-community.
代码 没同步完? hs-web/hsweb-framework@74d7421
from jetlinks-community.
代码 没同步完? hs-web/hsweb-framework@74d7421
抱歉抱歉,我没注意到 PR 有新的 commit,代码没同步完
同步后测试成功了,大佬🐂🍺,非常感谢!🙏
from jetlinks-community.
好的。没有问题我就合并了。
from jetlinks-community.
Related Issues (20)
- 官网文档挂了 HOT 1
- hsweb 支持 IS DISTINCT FROM 吗? HOT 4
- 规则编排 HOT 9
- Binding parameters is not supported for simple statement HOT 1
- 提个小疑问 HOT 2
- 场景联动下执行动作通过标签选择设备类型为非string报错 HOT 7
- 提示这个怎么办 HOT 1
- 使用docker 部署运行时,所有的镜像都可以运行,但是pgsql一直运行不起来,以下是错误信息 HOT 1
- 相同字段塞了两遍导致 sql 异常 HOT 10
- 社区版是屏蔽了网络流量统计的功能吗 HOT 1
- 网络流量统计是读取的物联卡还是自己计算上报数据来的 HOT 1
- API请求自定义超时时间 HOT 7
- 使用Mqtt 读取设备属性, 总是超时 HOT 8
- 如果我想增加一个类似设备触发的场景联动的触发模式,java具体需要增加些什么呢? HOT 3
- file queue xxx-1.queue is closed HOT 1
- 平台的消息总线/消息网关能否使用除Redis外的其他中间件? HOT 4
- 用户登录使用的什么加密解密方式?有具体代码吗? HOT 1
- 数据属性为array,元素属性为object,在运行状态中无法查看数据 HOT 7
- 设备管理-设备-日志管理部分内容乱码? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jetlinks-community.