Suppose I have classes A,B,C and A has a bidirectional OneToMany relationship to B, and B has a bidirectional OneToMany relationship to C. A is annotated with @Indexed and @Entity, and association ends are appropriately annotated with @OneToMany and @ManyToOne(... mappedBy).
I want to index the field C.name into A. So, if I've understood correctly I place an @IndexEmbedded(includePaths = { "c.name"}) on the A.getBs() method.
My question is where do I need to place a @ContainedIn annotation for indexing to operate correctly.
- On only the C.getB() method.
- On both the B.getA() and C.getB() methods
- Some other answer
Many thanks.