Hello
Is it possible in version 6 to add FilterDefinition without @FilrterDef annotation?
I tried MetadataContributor, but it is not working: not seen in the list of classLoaderService
import org.hibernate.boot.spi.InFlightMetadataCollector;
import org.hibernate.boot.spi.MetadataContributor;
import org.jboss.jandex.IndexView;
import org.kohsuke.MetaInfServices;
import org.springframework.stereotype.Component;
@Component
public class AddFilterContributor implements MetadataContributor {
@Override
public void contribute(InFlightMetadataCollector inFlightMetadataCollector, IndexView indexView) {
inFlightMetadataCollector.addFilterDefinition(new FilterDefinition(...));
}
}
Also. Not sure it is important: AddFilterContributor is still not created at the moment of calling MetadataBuildingProcess#complete
Mikl