如何在休眠状态下在内部查询中添加一个set parameter()方法?在休眠状态下创建内部查询
我已经尝试做这样的,但是已经有一个错误
这是我的代码
Query query=session.createQuery("select eq.euipmentName,eq.type from Euipment eq where eq.id in(select euipment from Quotation qt where qt. supQuotation=:ids)");
query.setParameter("ids",id);
list = (List<Euipment>)query.list();
什么是你的错误尝试? – Alex
我的错误是“----- Hibernate:select eq.euipmentName,eq.type from Euipment eq where eq。id in(select Quotes qt where qt。supQuotation =?的设备) 未知列'qt.supQuotation'in 'where clause'----“ – Dinesh
我的错误是--Hibernate:选择eq.euipmentName,eq.type from Euipment eq where eq。 ID in(从QT中选择设备,其中qt。supQuotation =?) 'where子句'中的未知列'qt.supQuotation' - – Dinesh