处理JPA错误: More than one row with the given id entifier was found

处理JPA异常: More than one row with the given identifier was found在使用hibernate entitymanager的时

处理JPA异常: More than one row with the given id entifier was found

在使用hibernate entitymanager的时候,我们会用 entityManager.createQuery("xxx").getResultList(); 来获取对象。在某些时候,就会产生如下的异常:

?