I'm new to Spring JPA. I has two questions about Example and ExampleMatcher API.
- Are there any ways to ignore all paths except some paths which I set matchers. Or are there any ways to ignore all paths if Example object's path has
null
value. It is quite annoying to set all path names like below:
ExampleMatcher<Product> matcher =ExampleMatcher.matching().ignorePaths("field_a", "field_b");
- How to match joined column using Example. For example. Product entity has User entity field as
@ManyToOne
relation. User entity has several fields but my Example object has User field only filled with userId field. In this case I want to find product data which hasuser_id
foreign key column matching userId field value included in user object included in product Example object.
Sorry for poor English... Actually this is my first question at Stack Overflow. Thanks for attention. I'm looking forward for great answers.