hibernate多表查询问题!摆脱了!
程序运行后报错
javax.servlet.ServletException: Invalid path: 'null.buy_info_id ' [from fd.mmk.zhangjian.hibernatePogo.Mmk_information_buy_info,fd.mmk.zhangjian.hibernatePogo.Mmk_information_compete_info where Mmk_information_compete_info.buy_info_id = Mmk_information_buy_info.id and Mmk_information_buy_info.user_id = ?]
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
------解决方案--------------------对象.属性 这样用有问题 先用as 然后引用才行
------解决方案--------------------把你的 HQL 帖出来
------解决方案--------------------应该是语句拼装错了吧
------解决方案--------------------from
fd.mmk.zhangjian.hibernatePogo.Mmk_information_buy_info,
fd.mmk.zhangjian.hibernatePogo.Mmk_information_compete_info
where
Mmk_information_compete_info.buy_info_id = Mmk_information_buy_info.id
and
Mmk_information_buy_info.user_id = ?
==================================================
(@!#……¥(@#&)¥&!)×¥!——
有你这么些的吗?
http://blog.csdn.net/cmtobby/archive/2007/08/22/1754994.aspx
自己好好去看下。。。
------解决方案--------------------where Mmk_information_compete_info.buy_info_id = Mmk_information_buy_info.id and Mmk_information_buy_info.user_id = ?]
这句HQL有问题,你要么"="号后全部跟变量,要么都用?号