Implement an "additional mapping" contributor SPI. Basically what {{AdditionalJaxbMappingProducer}} is today, but allowing additional mechanisms of contribution - e . g. direct {{PersistentClass}}, {{Table}}, etc. references from {{org.hibernate.mapping}}
Initial proposal -
{ noformat code:java }interface AdditionalMappingContributor { void contributeMappings( MappingContributions AdditionalMappingContributions contributions, IndexView jandexIndex InFlightMetadataCollector metadata , MappingBinder jaxbBinder ResourceStreamLocator resourceStreamLocator , MetadataBuildingContext buildingContext); }
interface MappingContributions { void contribute contributeEntity ( Binding Class <?> jaxbBinding entityType ); void contribute contributeBinding ( PersistentClass entity InputStream xmlStream ); voide contribute void contributeBinding ( JaxbEntityMappings mappingJaxbBinding); void contributeBinding(JaxbHbmHibernateMapping hbmJaxbBinding); void contributeTable( Table table); void contributeSequence(Sequence sequence); void contributeAuxiliaryDatabaseObject(AuxiliaryDatabaseObject auxiliaryDatabaseObject); }{code}
Ultimately will support contributing {{org . hibernate . mapping . PersistentClass } {noformat } references as well, though the exact semantics of that need to be worked out. E.g. what all gets auto-handled? Table? Secondary tables? etc |
|