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

来源:互联网 发布:东方网络股票怎么样 编辑:程序博客网 时间:2024/05/17 00:18
 产生此问题的原因:

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