So it would seem we would be able to add a tenantId field to OutboxEvent, but only map it in org.hibernate.search.mapper.orm.coordination.outboxpolling.event.impl.OutboxPollingOutboxEventAdditionalJaxbMappingProducer#produceMappings if the user is relying on discriminator-based multitenancy, which can be detected in that method through buildingContext.getMetadataCollector().getFilterDefinition(TenantIdBinder.FILTER_NAME) != null. This will, of course, only work with Hibernate ORM 6. |