Skip to content
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

Allow using JDBC and R2DBC repositories in a single application #1143

Closed
wants to merge 9 commits into from

Conversation

Stefanqn
Copy link

@Stefanqn Stefanqn commented Jan 26, 2022

avoids following code for parallel r2dbc usage:

@EnableJdbcRepositories(
  repositoryFactoryBeanClass = MixedJdbcRepositoryFactoryBean.class
)
...
class MixedJdbcRepositoryFactoryBean<T extends Repository<S, ID>, S, ID extends Serializable>
  extends JdbcRepositoryFactoryBean<T, S, ID> {

  public MixedJdbcRepositoryFactoryBean(Class<? extends T> repositoryInterface) {
    super(repositoryInterface);
  }

  @Autowired
  public void setMappingContext(@Qualifier("jdbcMappingContext") RelationalMappingContext mappingContext) {
    super.setMappingContext(mappingContext);
  }
}

@pivotal-cla
Copy link

@Stefanqn Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@Stefanqn Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 26, 2022
@mp911de
Copy link
Member

mp911de commented Jan 27, 2022

We actually should remove auto wiring on the factory bean altogether and handle the wiring externally.

@mp911de mp911de added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels May 15, 2023
@mp911de mp911de self-assigned this May 15, 2023
@mp911de mp911de changed the title chore: qualify jdbcMappingContext; expected behaviour for parallel r2dbc usage Allow using JDBC and R2DBC repositories in a single application Jun 8, 2023
@mp911de mp911de closed this in 9b2032d Jun 8, 2023
@mp911de mp911de added this to the 3.2 M1 (2023.1.0) milestone Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants