报错: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 =
xS]kA+C$A|@E >MYgf4UI6mNO .6"͗9Fwbsxkd# `^Bh ?al('q6}JQ2yChw :UE1:0n?p1npݑ^&yJLU'Tg,k6O` <8ZjP3եGʠ 9HIE2l#GU=Oz x!QN\Ka ۔96ȆNh{(2REn*'CVbFbn}&n|L`KmĀ1Llm=h5!o!KN$CS=dmou 6~fOVKMeW6$Ram_𓨿 w5CjW[Q6?ſt~Miz96Zt{ =Px6:XTN$

报错: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值找数据库记录没有找到,没有办法转换成对象.请查看外键之类的数据映射.

说你的字段名错误,你看一下有没有误写