OpenJPA Logo   ASF Logo

The first iteration of OpenJPA 2.0 is complete! Iteration 1 content is based on the 10/31/2008 draft of the JPA 2.0 specification. Here is a summary of the new features provided in iteration 1:

  • 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.

These new JPA 2.0 features are available in the latest nightly snapshot build. Be aware that the JPA 2.0 spec is not final so these features are subject to change.

Many thanks to those who contributed to this first iteration! If you'd like to be a contributor to the OpenJPA project, please post your interest on the dev mailing list or contact one of the active committers.

-Jeremy

Copyright (C) 2006,2010 The Apache Software Foundation. Licensed under Apache License 2.0.
Apache, the Apache feather logo and OpenJPA are trademarks of The Apache Software Foundation.
Other names may be trademarks of their respective owners.