JPA Repository: javax.persistence.NonUniqueResultException: result returns more than one elements

前端 未结 2 1746
有刺的猬
有刺的猬 2021-02-19 15:06

Using the below code I am unable to get the results of my query. Whether I use Map or Map I get the same error: javax.p

2条回答
  •  别那么骄傲
    2021-02-19 15:28

    It appears that the problem was that Map does not have a promise of a unique index, so JPA doesn't like mapping to it. By using List> instead, it works great!

提交回复
热议问题