-
Notifications
You must be signed in to change notification settings - Fork 101
Closed
Labels
type: enhancementNew feature or requestNew feature or request
Milestone
Description
What needs to be done
Add an Action to migrate-jpa-to-spring-boot.yaml to change explicitly set unitName attributes in PersistenceContext annotations (on member level) to 'default' if the value is not default.
Why it needs to be done
Recipe migrate-jpa-to-spring-boot.yaml does not touch unitName of @PersistenceContext but this recipe expects only one persistence-unit to exist with name 'default'. When a different unitName is set the Spring Boot application fails to start.
Acceptance Criteria
Given:
import javax.persistence.PersistenceContext;
import javax.persistence.EntityManager;
public class Foo {
@PersistenceContext(unitName = "foo")
private EntityManager entityManager;
}
Expected:
import javax.persistence.PersistenceContext;
import javax.persistence.EntityManager;
public class Foo {
@PersistenceContext(unitName = "default")
private EntityManager entityManager;
}
Metadata
Metadata
Assignees
Labels
type: enhancementNew feature or requestNew feature or request