不会是就是说没有主外键关系吧?似乎在hibernate中,没有主外键关系是不能连接表的。
还是这样吧select id,product_name,product_type from product where id not in(select product_id from Order);不过我没写过hibernate的子查询。不知道能不能行。所以不行的话还可以拆开执行吗。充分发挥灵活性。