妮妮儿  

2011年12月28日

摘要: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: * near line 1, column 8 [select * from tbl_orderproduct where o_or这个问题的主要原因是因为,hql语句不正确 我遇到了两次,第一次是updatetableA set a = '1' and b = '2' where c='3' ,应改为update tableA set a = '1',b='2' where c = ' 阅读全文
posted @ 2011-12-28 18:53 妮妮儿 阅读(134) 评论(0) 推荐(0)
 
摘要: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [cn.hbcf.xg.vo.Dept#1001]这个错误主要是因为用了hibernate框架 ,数据库中两个表有主外键关联,而这个属性在属于外键的这个表里的值在属于主键的那个表里不存在这个值,这种情况下会报这个错误,修改方法是将属于外键的那个表相关的 hbm.xml文件中有关该属性的配置设为 not-null=“false” not-found=“ignore”。或者修改表中的数据。这是我在程序中遇到问题时的修改方法,O(∩_∩)O~ 阅读全文
posted @ 2011-12-28 18:43 妮妮儿 阅读(116) 评论(0) 推荐(0)