UNION to JPA Query

前端 未结 7 940
日久生厌
日久生厌 2020-12-01 15:57

Is it possible to query \"UNION\" in JPA and even \"Criteria Builder\"?

I\'m looking for examples, but so far i got no result.

Does anyone have any examples

7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-01 16:24

    write native query (set it true , default its false) - ex.

    String findQuery = "select xyz from abc union select abc from def"
    @Query(value = findQuery, nativeQuery = true)
    //method
    

提交回复
热议问题