如何将SQL查询转换为JPA以进行以下SQL查询。
SELECT *
FROM commodity comm,
configuration config,
customer customer
where comm.commodity_id = config.commodity_id
and customer.customer_id = config.customer_id
and customer.customer_id=2 ;
我在下面尝试但没有按预期工作,
@Query("SELECT commodity FROM Commodity commodity, SCConfig config, Customerdetails customer WHERE ( (commodity = config.commodity_id) and (customer = config.customer_id) and (config.customer_id = :customer_id) ) group by commodity)
提前感谢您的回复。