If you have an entity that is not indexed (in the code sample below: class B), but has an IndexedEmbedded annotation that includes the numeric document ID of an indexed entity (in the sample below: class A), the validation fails.
Having that IndexedEmbedded annotation there is a valid scenario since the class (B) could itself be embedded by another indexed class (sample code: class C), just like you could also have other Field annotations in this non-indexed class (see someOtherStuff in the sample).
Validation failure exception stacktrace:
The message itself is misleading because it suggests the validation of class A fails, however the failures happens when class B is validated and the validator follows the IndexedEmbedded path to class A.
Thanks again for investigating on this issue!
I noticed another bug while working on your example code: HSEARCH-2547. I'll try to submit another PR to fix this soon.
Good news is, I have a fix for the specific issue you mentioned in this ticket and it's currently pending review. I'm confident it will be included in the final release.