-
-
Notifications
You must be signed in to change notification settings - Fork 246
HSEARCH-4330 Configurable mapping for entities added by the database-polling coordination strategy #2833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6e59a68 to
be79db4
Compare
| ServiceRegistry serviceRegistry = metadata.getMetadataBuildingOptions().getServiceRegistry(); | ||
| ConfigurationService service = HibernateOrmSpiUtils.serviceOrFail( | ||
| serviceRegistry, ConfigurationService.class ); | ||
| String entityDefinition = AGENT_ENTITY_MAPPING.get( | ||
| AllAwareConfigurationPropertySource.fromMap( (Map<String, ?>) service.getSettings() ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you need to pass additional parameters (like the configuration source) to the mapping producers, it would probably be better to give up on implementing AdditionalJaxbMappingProducer and use a custom interface. I'll push an additional commit.
| ServiceRegistry serviceRegistry = metadata.getMetadataBuildingOptions().getServiceRegistry(); | ||
| ConfigurationService service = HibernateOrmSpiUtils.serviceOrFail( | ||
| serviceRegistry, ConfigurationService.class ); | ||
| String entityDefinition = OUTBOXEVENT_ENTITY_MAPPING.get( | ||
| AllAwareConfigurationPropertySource.fromMap( (Map<String, ?>) service.getSettings() ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. I'll push an additional commit.
| import org.hibernate.service.Service; | ||
| import org.hibernate.service.ServiceRegistry; | ||
|
|
||
| public final class HibernateOrmSpiUtils { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should disappear with my additional commit.
…ion property source as an argument
be79db4 to
eaefbb1
Compare
|
Looks good, thanks. As I said above, I pushed an additional commit to simplify how the configuration property source is accessed. Let's merge once CI agrees. |
|
Kudos, SonarCloud Quality Gate passed! |








https://hibernate.atlassian.net/browse/HSEARCH-4330