Remember that ordinal parameters are 1-based

Workflow workflow = (Workflow)getSession()
     .createQuery("select w from cn.blueram.oa.model.Workflow w where w.name = ?")
     .setParameter(0, def.getName())
     .uniqueResult();

 

 

出错的原因居然是"?" ,无意中写成了一个中文的问好“?”

你可能感兴趣的:(workflow)