Spring Data JPA find by embedded object property

前端 未结 4 1027
小蘑菇
小蘑菇 2020-12-02 09:29

I want to write a Spring Data JPA repository interface method signature that will let me find entities with a property of an embedded object in that entity. Does anyone know

4条回答
  •  情歌与酒
    2020-12-02 10:04

    This method name should do the trick:

    Page findByBookIdRegion(Region region, Pageable pageable);
    

    More info on that in the section about query derivation of the reference docs.

提交回复
热议问题