No row with the given identifier exists

Hibernate中No row with the given identifier exists问题的原因及解决          
 

 产生此问题的原因:

      有两张表,table1和table2.产生此问题的原因就是table1里做了关联<one-to-one>或者<many-to-one unique="true">(特殊的多对一映射,实际就是一对一)来关联table2.   当hibernate查找的时候,table2里的数据没有与table1相匹配的,这样就会报No row with the given identifier exists这个错.(一句话,就是数据的问题!,注意你的数据就可以)

posted @ 2017-07-11 16:21  meonly  阅读(224)  评论(0编辑  收藏  举报