Entity Class is not @Indexed nor hosts @ContainedIn: class ca.statcan.icos.model.workload.SampleUnitContact
I am running into the error while running tests with this model:
@Index
class RegistryBasedCase {
@IndexedEmbedded
List<CaseContact> caseContacts;
}
class SampleUnit {
List<SampleUnitcontact> sampleUnitContacts;
}
abstract class Contact {
@IndexedEmbedded
List<ContactInformation> contactInformations;
}
class SampleUnitContact extends Contact {
....
}
class CaseContact extends Contact {
....
}
class ContactInformation {
@ContainedIn
Contact contact;
}
When I run the MassIndexer I get no error, as one might expect. However, when running the unit tests, whenever we try and save a SampleUnit the error is thrown. It seems it sees the @ContainedIn in the contact information but doesn't see that we only care about CaseContact, not SampleUnitContact. |