我有如下查询:
select * from Products p where ? between p.effctDate and p.expDate
Run Code Online (Sandbox Code Playgroud)
我可以将上述查询转换为 spring 数据 jpa 查询方法吗?例如:
findByProductId(productId)
Run Code Online (Sandbox Code Playgroud)
或者我只需要使用@Query或命名查询来处理此类查询。在提出问题之前,我尝试先在这里搜索以及 spring 数据站点,但没有找到任何解决方案。任何帮助表示赞赏。