休眠删除项目
当我尝试使用 HQL 删除对象时,我使用 hiberate 的 session.CreateQuery().executeUpdate() 并返回 1 项已删除。然而,在数据库中,没有任何内容被删除。在executeUpdate
之后,我也做了flush。
有人能给我一些关于这里出了什么问题的建议吗?
When I try to delete an object using HQL, I use hiberate's session.CreateQuery().executeUpdate()
and it returns 1 item is deleted. However, in database, nothing has been deleted. After executeUpdate
, I also did flush.
Could anyone give me some suggestion about what's wrong here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您尚未提交封闭交易。你需要类似的东西:
You haven't committed an enclosing transaction. You need something like: