我自己解决了
在删除的方法中加入这样几句代码就可以了Orders od=(Orders)session.load(Orders.class,item.getOrderId());
od.getOrderItems().remove(item);这样可以与要删除的数据解除关系