Migrate from OpenJPA to EclipseLink JPA

MSAL

These recipes help migrate Java Persistence applications using OpenJPA to EclipseLink JPA.

org.openrewrite.java.migrate.javax.openJPAToEclipseLink
mod run . --recipe=org.openrewrite.java.migrate.javax.openJPAToEclipseLink

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Set @Column(name = "element") on @ElementCollection attributes
  2. Add a default constructor to @Entity and @MappedSuperclass classes
  3. Add a @TableGenerator to automatically generated @GeneratedValue attributes
  4. Add @Transient to unannotated collection attributes
  5. Add @Transient to unannotated entity attributes
  6. Add @Transient to private accessor methods
  7. Remove @Id from @Embeddable classes referenced by an @EmbeddedId
  8. Remove the @Temporal annotation for some java.sql attributes
  9. Replace @Column with @JoinColumn on relationship mappings