07-09
04

could not resolve property

org.hibernate.QueryException could not resolve property userid of com.xxx.yyy.Pay

使用到外键userid的时候,必须使用userinfo.userid方法才能得到。

=========================================
javax.naming.NameNotFoundException Name hibernate_connection_factory is not bound in this Context
原因:hibernate的数据库映射.xml文件有配置错误,导致hibernate_connection_factory无法绑定数据库。
例如many-to-one设置了以后,仍然在其中设置相冲突的property属性。


正确样例:
list = session.find("from NewsVO as n where n.cate=" + cid + "");
cate为一对多关系中的ONE

文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: Exception
相关日志:
评论: 0 | 引用: 0 | 查看次数: 4268
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 1000 字 | UBB代码 开启 | [img]标签 关闭