I am working on reindexing and experience a problem with Hibernate subclasses.
The problem is that some of my classes do not get reindexed.
I have started researching and found out that Compass incorrectly interprets Hibernate's subclassing hierarchy for inherited classes.
Compass wants to ignored inherited classes which have their superclasses mapped in Compass as well. This is correct.
To check if a class is inherited, Compass calls ClassMetadata.isInherited(). This is correct.
Then the following happens:
Class mappedClass = classMetadata.getMappedClass(EntityMode.POJO);
Class superClass = mappedClass.getSuperclass();
As a superclass, compass gets the superclass of the class. This is NOT correct. In Hibernate, class mappings often declare NOT their direct superclasses in "extends. For instance:
NokisMetadataRecord is NOT a direct subclass of AbstractBaseRecord.
Superclass should be retrieved from the mapping metadata as well.
I'll try to correct it and report back.