@Indexed
class UserGroup {
@IndexedEmbedded(includeEmbeddedObjectId = false, includePaths = {"defaultUserPosition1.user.id"})
Collection<SocialGroup> socialGroupCollection;
}
class SocialGroup extends SocialEntity{
}
class SocialEntity{
UserPosition defaultUserPosition1;
}
class UserPosition{
User user;
}
class User{
Integer id;
}
And I have this error.
Found invalid @IndexedEmbedded->paths elements configured for member ‘socialGroupCollection’ of class ‘UserGroup’. The invalid paths are [socialGroupCollection.defaultUserPosition1.user.id]
If you want UserGroup to be reindexed when User changes, yes, you’ll need a @ContainedIn from User to UserPosition, from UserPosition to SocialEntity and from SocialGroup to UserGroup.