Validation of IndexedEmbedded targeting a numeric document ID fails inside a non-indexed entity
Description
Activity
Show:

Yoann Rodière January 13, 2017 at 10:56 AM
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.
Fixed
Details
Details
Assignee

Reporter

Fix versions
Affects versions
Priority
Created January 12, 2017 at 10:18 PM
Updated January 22, 2017 at 1:08 AM
Resolved January 13, 2017 at 5:51 PM
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.