Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: for the plan.

Jump to: navigation, search


< EclipseLink‎ | Examples‎ | JPA‎ | Migration‎ | OpenJPA

Migration from OpenJPA to EclipseLink JPA: Extended Functionality

Note: Under Construction

OpenJPA does offers some extended functionality that goes beyond the JPA specification the following sections describe these features and how you migrate to the corresponding functionality in EclipseLink. If there are additional features not covered in this page or the materials provided are incomplete for your needs please log a documentation enhancement request referencing this page describing the migration challenge.

  • BigCollection
  • FetchPlan/Group
  • Inheritance Casting
  • Native SQL with POJO results
  • Detached (Serialized) entities & relationships
  • PersistentCollection: When the OpenJPA specific @org.apache.openjpa.persistence.PersistentCollection annotation is used with an array of objects field type, a new table is created for this field. Simply removing the @PersistentCollection annotation without a replacement will result in this new table not being created.
    • In order to continue using the existing table created for the array of objects field, the following adjustments to the entity class can be made:
      1. Replace the @org.apache.openjpa.persistence.PersistentCollection annotation with @javax.persistence.ElementCollection and @Column(name="ELEMENT")
      2. Change the array to be a collection of objects.
        Before After
        private int[] arrayOfInts;
        private List<Integer> arrayOfInts;

Back to the top