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?