hibernate 读取唯一结果

2025-02-24 12:00:40
推荐回答(2个)
回答1:

q.list().get(0); 不就可以了
既然知道是一个值的话

回答2:

uniqueResult();