we can use the jpa annotations
That’s not an option, as Hibernate Search needs to be able to add that entity to the Hibernate ORM mapping conditionally depending on settings. Believe me, we’re not using XML mapping because we like it 😑 It’s just the only solution for dynamic mapping (yes, it’s dynamic). Also, I don’t really want to expose these entity types as API, because that will get in the way of future evolutions. There’s a middle ground to be found between flexibility for Hibernate Search users and flexibility for Hibernate Search developers. You can already change the XML mapping yourself if you want, through configuration properties. Though that’s completely unsupported and could break at any time: see org.hibernate.search.mapper.orm.coordination.outboxpolling.cfg.spi.HibernateOrmMapperOutboxPollingSpiSettings#OUTBOXEVENT_ENTITY_MAPPING. |