Hibernate: More than one row with the given identifier was found error

前端 未结 10 905
有刺的猬
有刺的猬 2020-12-01 01:20

I\'m using spring 4.0.5 and hibernate 4.3.5; I\'m facing an error with hibernate and I can\'t figure where I\'m wrong (because I\'m sure I\'m wrong). I have a table related

10条回答
  •  执笔经年
    2020-12-01 02:16

    I had the same issue, when I am executing a native query having join of 2 tables but the Entity does not contain the fields from another table.

    After lot of struggle below solution worked for me:

    I simply declared the fields that are required and not present in the entity (also these fields are the same which are not present in the table that current entity represents) with its getter and setters.

提交回复
热议问题