Skip to content

EntityManagerBeanDefinitionRegistrarPostProcessor should set primary flag on EntityManager bean definitions #2288

Closed
@schosin

Description

@schosin

When creating multiple LocalContainerEntityManagerFactoryBean beans and marking one or more as primary, the created EntityManager beans should be marked as primary as well.

This change would make it easier to add another EntityManager to an existing application as no further code changes are necessary. Currently Spring fails to autowire EntityManager as there is no primary bean available.

This should also fix spring-projects/spring-framework#24097.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions