JPA 2.0 Road Map
Apache OpenJPA 2.0.0 is being developed in trunk and will be a JPA 2.0 certified release of the JSR-317 specification.
Development Process
The process that OpenJPA will be following for developing JPA 2.0 functionality is documented here. The specific roadmap and iteration details will be documented on this Roadmap page.
Test Coverage
For a list of databases being tested and current status, checkout the JPA 2.0 Test Coverage page.
Presentations
Take a look at the JPA 2.0 Presentations page for more details on the major new features of the JPA 2.0 specification and how they are being implemented in OpenJPA.
Iteration Schedule and Content
|
Jump to #Task List
...
Milestone 1
Anchor | ||||
---|---|---|---|---|
|
The Milestone 1 release was never "officially" released, due to the JSR-317 terms of use issues, but the files were tagged in svn and can be checked out using:
No Format |
---|
svn co https://svn.apache.org/repos/asf/openjpa/branches/2.0.0-M1/
|
Anchor | ||||
---|---|---|---|---|
|
Iteration 1 Summary - OPENJPA-800
With the completion of iteration 1, OpenJPA includes many new JPA 2.0 (based on the 10/31/2008 spec draft) features. Here is a summary of the new features provided by OpenJPA:
- The current level of JPA 2.0 API. You can compile against and use implemented methods of the new API. Unimplemented methods will throw an UnsupportedOperationException.
- Validation using the current JPA 2.0 orm and persistence schemas. Version 2.0 persistence and orm files will validate using these new schemas. Metadata elements provided in iteration 1 (collection-table and element-collection) will validate and can be specified in XML.
- Support for nested embeddables. An embeddable can now be nested within another embeddable.
- Support for relationships within embeddables. Embeddables can now contain relationships.
- Collections of embeddables and basic types through the use of ElementCollection and CollectionTable. Element collections and collection tables can be specified using annotations or in a version 2.0 orm XML.
- Support for the Criteria API based on the current spec level, including the new constructs; KEY(), VALUE(), and CASE(). OpenJPA also includes the ability to convert queries constructed with the Criteria API to JPQL.
- Support for JPA 2.0 JPQL. Compilation of JPA 2.0 JPQL statements and execution of the new JPQL expressions including simple case expressions, general case expressions, coalesce, and the nullif expression. In addition, the select expression allows mathematical operations and the result alias can be specified in the select expression and in the ORDER BY clause. Execution of additional JPA 2.0 JPQL expressions will be added in future iterations.
- Native sequence generators allow the database schema name to be specified on the annotation or in a version 2.0 orm XML.
Anchor | ||||
---|---|---|---|---|
|
Iteration 1a Summary - OPENJPA-831
With the completion of the 1a iteration, the OpenJPA documentation has been updated to contain the most current JPA 2.0 schemas.
Anchor | ||||
---|---|---|---|---|
|
Iteration 2 Summary - OPENJPA-807
With the completion of iteration 2, OpenJPA includes several additional JPA 2.0 (based on the 10/31/2008 spec draft) features. Here is a summary of the new features provided by OpenJPA:
- Support for the JPA 2.0 level 2 cache interface. Operations on the OpenJPA data cache are now available from the entity manager factory through a standard JPA interface.
- Support for use of order column through a JPA annotations or orm mapping file elements. Existing OpenJPA support for order columns has been extended to support the JPA standard OrderColumn definition. This iteration supports a configurable base value attribue. Support for the table and contiguous attributes will be provided in future iterations.
- Enhanced map support. The use of Map collections has been significantly enhanced. This iteration includes use of the new MapKeyClass, MapKeyColumn, MapKeyJoinColumn, and MapKeyJoinColumns annotations and corresponding orm mapping file elements.
- Support for JPQL INDEX() function within a query projection or predicate. Allows the index of ordered columns to be projected or used as part of a query predicate. Projection is currently not supported for element collection. This support will be added in a future iteration.
- Support for entity TYPE() expression. Allows projection of or query criteria based on entity type. OpenJPA does not currently allow selection of an abstract entity type.
- Support for new javax.persistence standard properties. Standard properties such as javax.persistence.jdbc.driver can now be specified as configuration properties.
...
Milestone 2
Anchor | ||||
---|---|---|---|---|
|
The Milestone 2 release will not be an official ASF release, but will be created as a Early Access 2 SNAPSHOT branch due to the JSR-317 terms of use restrictions. A distribution of the Early Access 2 SNAPSHOT is available here for download or the code can be checked out from svn.
Section | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Iteration 3 Summary - OPENJPA-808
With the completion of iteration 3, OpenJPA includes several additional JPA 2.0 (based on the 10/31/2008 spec draft) features. Here is a summary of the new features provided by OpenJPA:
- Support for collection-valued parameters in JPQL using the IN expression. A collection-valued parameter (List, Set, etc.) may now be used in conjunction with the IN expression within the where clause of a JPQL statement.
- JPA specification level is available through OpenJPA configuration. The JPA specification level of the provider can now be retrieved via the openjpa.Specification property.
- Support for derived identities including the use of MappedById. OpenJPA now supports entities which have an identity that is derived from the id of another identity for one-to-one and many-to-one relationships with a parent-dependent type association.
- Support for getSupportedProperties and getProperties methods on the EntityManager and EntityManagerFactory. The active properties and their values, in addition to the full set of supported properties can be retrieved for the EntityManager and EntityManagerFactory.
- The OrderColumn annotation and equivalent XML now allows the specification of the table element. The table element can be used to specify the join or collection table used to maintain the relationship.
- Support for getHints and getSupportedHints on Query. The active hints and their values, in addition to supported hints can be retrieved for a Query.
Anchor | ||||
---|---|---|---|---|
|
Iteration 4 Summary - OPENJPA-875
With the completion of iteration 4, OpenJPA includes several additional JPA 2.0 (based on the 10/31/2008 spec draft) features. Here is a summary of the new features provided by OpenJPA:
- Support new JPA LockModeType in find, lock and refresh methods in the EntityManager interface. A new "mixed" lock manager is introduced implementing the new mixed optimistic and pessimistic entity locking semantics.
- AttributeOverride enhanced to allow navigation of multiple levels of embeddables, use with map keys and values, and use with element collections.
- AssociationOverride enhanced to support specification of of a join table and override of embeddables within relationships.
- Additional support of derived identities.
- Support for general and qualified identification variables in JQPL selections. KEY, ENTRY, and VALUE qualifiers
can now be used within the SELECT clause.
Anchor | ||||
---|---|---|---|---|
|
Iteration 5 Summary - OPENJPA-956
With the completion of iteration 5, OpenJPA includes several additional JPA 2.0 (based on the 03/13/2009 spec draft) features. Here is a summary of the new features provided by OpenJPA:
- Updated spec APIs and schemas based upon most current specification draft. New, unimplemented methods will throw an UnsupportedOperationException.
- A lock timeout hint value can now be specified on applicable entity manager and query methods.
- Lock mode (including the new pessimistic lock modes) can be specified on query methods and named queries. This allows for fine-grained locking configuration at the method level.
- The unwrap method can be used to get access to underlying OpenJPA entity manager and query interfaces.
- JPQL queries support the selection of KEY, VALUE, and ENTRY map values.
- Single entities or an entity graph may be detached from the entity manager. Specifying the new cascade type of DETACH or ALL on relationships allows selective detachment of an entity graph.
- The third argument of the JPQL SUBSTRING function is now optional.
- JPQL queries have been enhanced to support the projection of element collections.
- JPQL queries have been enhanced to support nested embeddables and relationships from embeddables.
Anchor | ||||
---|---|---|---|---|
|
Iteration 6 Summary - OPENJPA-1007
With the completion of iteration 6, OpenJPA includes several additional JPA 2.0 (based on the 03/13/2009 spec draft) features. Here is a summary of the new features provided by OpenJPA:
- Query timeout detection for additional databases. Query timeouts are more accurately detected and reported in DB2, Oracle, SQL Server, and Informix.
- Support for scalar expressions in JPQL subqueries. Scalar expressions such as substring can now be used within a subquery.
- Support for explicit access types on persistent types. The persistence access method to use can now be specified on a per-type and field/method level.
- Updates to OrderColumn and EntityManager methods to match new spec draft.
- JPQL queries now support key/value paths as arguments to scalar functions. KEY() and VALUE() can now be used to indicate that a map key or value should be used as an argument to a scalar function.
Anchor | ||||
---|---|---|---|---|
|
Iteration 7 Summary - OPENJPA-1052
With the completion of iteration 7, OpenJPA includes several additional JPA 2.0 (based on the 03/13/2009 spec draft) features. Here is a summary of the new features provided by OpenJPA:
- New MapKeyEnumerated and MapKeyTemporal annotations and equivalent XML elements for tagging the key of a map collection as either an enumerated or temporal type.
- Base support for JSR-303 Bean Validation including basic configuration and lifecycle-based event validation.
- Support the use of delimited identifiers within annotation attributes for a subset of mapping annotations when using the Derby and DB2 databases. Support for additional databases will be added in future iterations.
- JPQL subqueries now support derived path expressions and the use of KEY() on map collections.
- OSGI bundle metadata has been added to the OpenJPA jar. This simplifies the use of OpenJPA in an OSGi environment such as Apache Felix.
- OrderBy no longer requires name attribute when applied to a collection of basic type.
...
Milestone 3
Anchor | ||||
---|---|---|---|---|
|
The Milestone 3 release is an official ASF release, but we encourage you to upgrade to the final 2.0.0 as soon as possible after it is released. A distribution of the Milestone 3 is available here for download or the code can be checked out from svn.
Section | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Iteration 8 Summary - OPENJPA-1105
With the completion of iteration 8, OpenJPA includes several additional JPA 2.0 features and bug fixes. Here is a summary of the new features provided by OpenJPA:
- Sub-project for JSR-303 (Bean Validation) testing with configurable bean validation providers.
- Automatic detection of bean validation providers.
- Support for bean validation groups, configurable through standard persistence.xml properties.
- Bug fixes for attribute-overrides and embeddable processing.
- Performance enhancements to class reflection utility. Provides 17% performance gain in some benchmarks.
Anchor | ||||
---|---|---|---|---|
|
Iteration 9 Summary - OPENJPA-1152
With the completion of iteration 9, OpenJPA includes several additional JPA 2.0 features and bug fixes. Here is a summary of the new features provided by OpenJPA:
- Bean Validation support for validation groups. Specific validation groups can be targeted for lifecycle events.
- A TraversableResolver is now registered with the bean validator. The resolver ensures that only loaded attributes are validated.
- A PersistenceProviderResolver and PersistenceProviderResolverHolder are available from the Geronimo Spec API. PersistenceProviderResolver can be used to return the list of persistence providers available in the runtime environment.
- Availablility of ProviderUtil and PersistenceUnitUtil interfaces. These interfaces provide methods to determine the load state of a persistent entity or attribute. In addition, PersistenceUnitUtil can be used to get the identifier of an entity.
- Significant improvements to OpenJPA's subquery processing.
- OpenJPA now includes the ability to use a pluggable encryption provider. This provider can be used to support encrypted database passwords in the persistence.xml. See the Encryption Provider chapter in the documentation for more details.
Anchor | ||||
---|---|---|---|---|
|
Iteration 10 Summary - OPENJPA-1209
With the completion of iteration 10, OpenJPA includes several additional JPA 2.0 features and bug fixes. Here is a summary of the new features provided by OpenJPA:
- Support for the Criteria and Metamodel API. The Criteria and Metamodel API can be used in conjunction to create and execute strongly-typed programmatic queries.
- Metamodel source file generation. OpenJPA provides tooling to generate metamodel source classes.
- Support for the TypedQuery and Tuple interfaces. These interfaces are provided to manipulate typed queries and their results.
- Automatic setting of compatibility options based upon persistence version. Compatibility options are configured based on persistence version to provide backward compatibility for OpenJPA version 1.x applications.
- Support for naming of unique constraints.
- Lob, Temporal, and Enumeration can now be specified on element collections.
- JPQL now supports multiple constructors in the query projection list.
- Support for the shared-cache-mode element in the persistence.xml. Provides configuration/enablement options for L2 cache.
- Support for Cacheable annotation and CacheStoreMode/CacheRetriveMode properties. Allows per class configuration of L2 cacheing and per-operation tuning of cache behavior.
- Database updates including updates for Derby reserved words, usage of a new version of commons-pool and commons-dbcp, and a new Derby network server test profile.
- Support for JDBC date, time, and timestamp literals within JPQL and Criteria queries.
Anchor | ||||
---|---|---|---|---|
|
Iteration 11 Summary - OPENJPA-1268
With the completion of iteration 11, OpenJPA includes several additional JPA 2.0 features and bug fixes. Here is a summary of the new features provided by OpenJPA:
- OpenJPA is based upon Proposed Final Draft 2 of JSR-317.
- Support for cascading detach using cascade-detach as specified in the orm.xml.
- Assertion that relationships in MappedSuperclass are unidirectional.
- OpenJPA was updated to the CR5 level of the bean validation specification.
- A new code sample which showcases the use of embeddables.
- Corrected an XML encoding issue which occurred when using XML data with SQL Server.
- Many documentation updates.
- Improved test coverage for many database platforms. The current test matrix is available here.
...
Milestone 4
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Iteration 12 Summary - OPENJPA-1337
With the completion of iteration 12, OpenJPA includes several additional JPA 2.0 features
and bug fixes. Here is a summary of the new features provided by OpenJPA:
- Continued improvements to test coverage for additional databases.
- Many documentation updates, notably for Criteria API and Metamodel tooling.
Anchor | ||||
---|---|---|---|---|
|
Iteration 13 Summary - OPENJPA-1373
...
OpenJPA 2.0 Tasks
Anchor | ||||
---|---|---|---|---|
|
JPA 2.0 Spec Features
Status | JIRA(s) | Effort | Summary | Area | JPA 2.0 Spec Reference(s) |
---|---|---|---|---|---|
In Progress | Medium | New database object naming conventions (delimited-identifiers) | General | 2.13, 12.2.1.13, 12.3 | |
In Progress | Medium | Added new javax.persistence.lock.scope property | Locking | 3.4.3 | |
In Progress | Low | Added find method that accepts properties (no lock mode) | EM | 3.1.1 | |
In Progress | Low | New refresh method that accepts properties (no lock mode) | EM | 3.1.1 | |
In Progress | Low | Verify cache mode properties support on find, refresh and Query | Cache | 3.7.2 | |
Complete | Medium | Review @JoinColumn elements for behavioral changes | Mapping | 11.1.21 | |
Complete | Medium | Review clarifications to locking modes | Locking | 3.4.3 | |
Complete |
| Low | Review chapter on deployment and bootstrapping contracts for updates. | General | Ch 9 |
Complete | Low | Assert that relationships defined in a mapped superclass must be unidirectional. | General | 2.11.2 | |
Complete | Spec updated | TBD | New JPQL reserved identifiers. | JPQL | 4.4.1 |
Complete | Low | Review @OrderBy for behavioral changes | Mapping | 11.1.38 | |
Complete | Low | Test CascadeType.DETACH via orm.xml | Testing | 12.3 | |
Complete | Routine JPQL BNF update | Low | Updated single_valued_path_expression definition | JPQL | 4.4.4 |
Complete | Routine JPQL BNF update | Low | New JPQL reserved identifiers should not be used as result variables | JPQL | 4.4.1 |
Complete | Low | attribute-override and association-override available from element-collection XML schema type | Mapping | 12.3 | |
Complete | Medium | Support for CacheRetrieveMode and CacheStoreMode properties. | Cache | 3.7.2 | |
Complete | Low | Cacheable attribute added to entity element in orm.xml | Cache | 12.2.3.3, 12.3 | |
Complete | Medium | Cacheable annotation | Cache | 3.7, 11.1.7 | |
Complete | Low | Support for JDBC escape sequence for date/time literals (6/19 rev) | JPQL | 4.6.1 | |
Complete | Low | Allow Lob, Temporal, Enumerated annotations to be applied to element collections annotations and in XML. | Mapping | 11.1.16, 11.1.24, 11.1.47 | |
Complete | Low | Cache mode elements added to persistence.xml | Cache | 3.7.1, 3.7.2, 8.3 | |
Complete | Low | Default value change of exclude-unlisted-classes element | General | 8.2.1.6.1 (7/23) | |
Complete | Low | EntityManagerFactory getProperties returns Map of <String, Object> | EMF | 7.4 | |
Complete | Medium | Added setProperty method | EM | 3.1.1 | |
Complete | High | Build strictly-typed Criteria API | Criteria | Ch 6 | |
Complete | High | Build weakly-typed Criteria API | Criteria | Ch 6 | |
Complete | High | Added getParameters, getParameterValue, getParameter methods to Query interface | Typed Parameters | 3.8.1, 3.8.5 | |
Complete | High | Populate canonical meta-model for strictly typed Criteria Query building | Metamodel | Ch 5 | |
Complete | High | Instantiate meta-model classes for JPA 2.0 from source code annotations | Metamodel | Ch 5 | |
Complete | High | Generate meta-model for JPA 2.0 | Metamodel | Ch 5 | |
Complete | Low | Optional name element to UniqueConstraint annotation and corresponding XML type. | Mapping | 11.1.49, 12.3 | |
Complete | Medium | Provide TraversableResolver for use with Bean Validation Factory | Spec API | 3.6.1.2 | |
Complete | Low | Modified getQueryBuilder to return updated criteria query builder | EMF, Criteria | 7.4 | |
Complete | Low | New getMetamodel method | EMF, Metamodel | 7.4 | |
Complete | High | Implement Typed Query interface | Typed Query | 3.8.1, 3.8.5 | |
Complete | High | Implement Tuple interface | Typed Query | 3.8.1, 3.8.5 | |
Complete | High | Support Bean Validation: Entity validation upon lifecycle events. | Bean Validation | 3.6, 3.2.9 | |
Complete | Low | Validation target groups via persistence.xml or createEMF properties Map | Bean Validation | 3.6.1.2, 8.3 | |
Complete | Low | Modified createQuery to accept updated criteria query definition | EM, Criteria | 3.1.1 | |
Complete | Low | Modified getQueryBuilder to return updated criteria query builder | EM, Criteria | 3.1.1. | |
Complete | OPENJPA-805 | High | JPQL Updates | JPQL | Ch. 4 |
Complete | High | Migrate existing Criteria Query implementation as OpenJPA extension | Criteria | Ch 6 | |
Complete | Medium | OrderBy annotation applied to an element collection of basic type doesn't require property or field name | Mapping | 11.1.38 | |
Complete | Medium | Added MapKeyEnumerated and MapKeyTemporal annotations and XML. | Mapping | 11.1.30, 11.1.33, 12.3 | |
Complete | Medium | Allow use of AssociationOverrides with mapped superclass relationships. | Mapping | 11.1.2 | |
Complete | Medium | Support default query hint for query timeout | EM, Query | 3.8.8 | |
Complete | Medium | Support persistent access types including @Access annotation and AccessType enum and XML | General | 2.3, 11.1.1, 12.2.1.4, 12.2.2.4, 12.3 | |
Complete | Low | Remove contiguous and base elements from OrderColumn annotation | Mapping | 11.1.39 | |
Complete | Low | Removal and revert behavior of getNamedParameters and getPositionalParameters | Query | 3.8.1 | |
Complete | Low | Added getMetamodel method | EM, Metamodel | 3.1.1 | |
Complete | Low | Renamed clear method to detach | EM | 3.1.1 | |
Complete | Low | Changed target-entity attribute to target-class in element-collection | Mapping | 12.3 | |
Complete | Low | Update pessimistic lock mode names | Locking | 3.4.4 | |
Complete | Low | Timeouts are in milliseconds. | Query, Locking | 3.8.8, 3.4.4.3 | |
Complete | Low | Renamed cascade CLEAR to DETACH | EM | 3.1.1, 3.2.6 | |
Complete | Low | Validation-mode element support added to persistence.xml and to createEMF properties Map | Bean Validation | 3.6.1.1, 8.3 | |
Complete | Low | Support application/container provided ValidatorFactory | Bean Validation | 3.6.2 | |
Complete | Medium | PersistenceProviderResolver interface and PersistenceProviderResolverHolder class | Spec API | 9.3 |
Task list for JSR-317 10/31/2008 public draft
Other Improvements
Status | JIRA | Summary |
---|---|---|
Not Started | Instantiate meta-model classes for JPA 2.0 from XML descriptors | |
Complete | Tests that currently fail should be committed to the repository | |
Complete | Allow compilation with JDK 6 | |
Complete | Bean Validation APIs should be an optional runtime dependency | |
Complete | Reflection class performance improvement |
General Tasks
Status | JIRA | Summary |
---|---|---|
Not Started | OpenJPA does not fully support database catalogs | |
Not Started | Allow multiple keys for the same property to be specified at different levels | |
Ongoing | Upgrade to JPA 2 - umbrella task - includes updating spec API | |
In Progress | Map existing OpenJPA extensions to new features of JPA 2.0 | |
Complete | Detect and store JPA version | |
Not Started | Remove early-access disclaimer from the NOTICE files once the spec is released |
...