can I perform a query inside of JPA entity to get back a single column

前端 未结 2 1883
自闭症患者
自闭症患者 2021-01-25 17:42

I have a dumb question. It would be great if this could be done, but I am not holding my breath.

I need a single column from a table linked to my JPA entity to be a c

2条回答
  •  心在旅途
    2021-01-25 18:29

    Suppose a Category has many products:

    select product.name from Category c inner join c.products product where ...
    

    If that's not what you want, please show an example in your question.

提交回复
热议问题