String hql = "from CSTInventory inventory where inventory.productNumber = :productNumber and inventory.supplier.coden = :supplierCoden";
return (CSTInventory)this.createQuery(hql).setParameter("productNumber", productNumber).
setParameter("supplierCoden", supplierCoden).uniqueResult();
给in赋值
String countHQL = "select count(compound.id) from CSTCompound compound where 1=1 ";
StringBuilder builder = new StringBuilder();
builder.append(countHQL);
builder.append(" and compound.structure.id in (:ids)");
query = query.setParameterList("ids", structureIds);