I am unable to figure out how to add annotations in case of same class is used as parent and child entity. Here is example
@Indexed public class Space{
@DocumentId(name = "spaceId") private Long id;
@Field(name="spaceName", index = Index.TOKENIZED, store = Store.NO) private String name; @Field(name = "spacePermissions", index = Index.TOKENIZED, store = Store.NO) private String permissions;
private Space parent;
private Set<Space> folders; }
I have also configured 6 listeners for insert/update/delete (also for collections) and flush events.
I tried several combinations by having @ContainedIn and @IndexedEmbedded on both parent and folders. It generates indices properly on insert and delete of a folder. But on update a folder, it is not generating indices with updated folder/space name;
My search is unable to find the updated folder. What am I missing here?
|