Spring MongoDB + QueryDSL query by @DBRef related object

心不动则不痛 提交于 2019-12-05 16:51:16

No need for QueryDSL when searching by ID. In OrderRepository, create an interface method:

public List<Order> findByUser(String userId);

Request example: curl http://localhost:8080/orders/search/findByUser?userId=5a950ea0a0deb42729b570c0

* I'm stuck on how to query orders, for example, of all users from certain city (some mongo join with user and address).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!