I am using Spring Data JPA.
I an entity like this
public class A {
@CollectionTable(name = "B_ITEMS", joinColumns = @JoinColumn(name = "B_ID"))
@ElementCollection
private List<B> bs;
}
And an Embedded class
@Embeddable
public class B {
private String prop1
private String prop2
private String prop3
}
How do I search entity A using the contents @ElementCollection B?
And here's my repository Spring Data JPA Repositry
public interface ARepo extends PagingAndSortingRepository<Clinic, Long> {
}
What Query method name is applicable for my use case?
You seem to be asking for a basic IN query in Spring Data - findBybsIn(List<B> bs)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With