报错:No row with the given identifier exists:13,of class:NHibernateWebDemo.Model.Supply 源代码:public static IList GetProductBystorstates_AllCount(int state,int audit,string keyword){string hql = "select p from Product_Sup p join p.ProductTy
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/21 01:07:39
![报错:No row with the given identifier exists:13,of class:NHibernateWebDemo.Model.Supply 源代码:public static IList GetProductBystorstates_AllCount(int state,int audit,string keyword){string hql =](/uploads/image/z/12093587-35-7.jpg?t=%E6%8A%A5%E9%94%99%EF%BC%9ANo+row+with+the+given+identifier+exists%3A13%2Cof+class%3ANHibernateWebDemo.Model.Supply+%E6%BA%90%E4%BB%A3%E7%A0%81%EF%BC%9Apublic+static+IList+GetProductBystorstates_AllCount%28int+state%2Cint+audit%2Cstring+keyword%29%7Bstring+hql+%3D+%22select+p+from+Product_Sup+p+join+p.ProductTy)
报错:No row with the given identifier exists:13,of class:NHibernateWebDemo.Model.Supply 源代码:public static IList GetProductBystorstates_AllCount(int state,int audit,string keyword){string hql = "select p from Product_Sup p join p.ProductTy
报错:No row with the given identifier exists:13,of class:NHibernateWebDemo.Model.Supply
源代码:
public static IList GetProductBystorstates_AllCount(int state,int audit,string keyword)
{
string hql = "select p from Product_Sup p join p.ProductType_Sup pt where p.ProductState= " + state + "and p.IsAuditing=" + audit + "and p.ProductName like '%" + keyword + "%' or pt.ProductTypeName like'%" + keyword + "%'or p.Effect like'%" + keyword + "%'" + "or p.ProductName='" + keyword + "'or p.Effect='" + keyword + "'or pt.ProductTypeName='" + keyword + "'";
return session.CreateQuery(hql).List();
}
报错:No row with the given identifier exists:13,of class:NHibernateWebDemo.Model.Supply 源代码:public static IList GetProductBystorstates_AllCount(int state,int audit,string keyword){string hql = "select p from Product_Sup p join p.ProductTy
根据PK值找数据库记录没有找到,没有办法转换成对象.请查看外键之类的数据映射.
说你的字段名错误,你看一下有没有误写