【发布时间】:2026-01-28 02:40:01
【问题描述】:
我正在通过 hibernate 执行 SQL 查询,如下所示:
SELECT thi
FROM track_history_items thi
JOIN artists art
ON thi.artist_id = art.id
WHERE thi.type = "TrackBroadcast"
GROUP BY art.name
ORDER thi.createdAt DESC
但我收到“要遍历的节点不能为空!”的消息。有谁知道是什么原因造成的?
--编辑--
我很确定这个问题是由 artist_id 为空的可能性引起的。但是,我无法阻止这种情况,所以我可以跳过具有空艺术家 ID 的行 track_history_item 行吗?
【问题讨论】:
-
什么是休眠映射?和 java/hibernate 查询?