HIBERNATE JBoss.org
 |  Register  | 
     
News 
About 
   Feature List 
   Road Map 
Documentation 
   Related Projects 
   External Documentation 
Download 
Forum & Mailinglists 
Support & Training 
JIRA Issue Tracking
Wiki Community Area


Hibernate Public Training Courses


Get Hibernate in Action eBook!


JavaWorld 2003 Finalist


Jolt Award 2004 Winner
      
About > Road Map

Road Map

Hibernate 2.1


This is the branch of choice for any production system using Hibernate. Hibernate2 is a stable and complete object/relational mapping solution with all functionality needed by a typical Java application.

This branch of Hibernate has been stable since end 2003. We continue providing bugfixes and also integrate or backport minor new features throughout the next years. The Hibernate documentation will also be maintained and is currently being translated into French, German, Italian, Chinese, Russian, and Portuguese.

We recommend and encourage Hibernate users to regularly update their installation to the current version of this branch.

Hibernate3


Hibernate3 is an evolutionary new version. Hibernate3 innovates beyond what our users are asking for, or have even thought of. Certainly we will be adding features that go well beyond the functionality of the best commercial ORM solutions. Some of these features will be most interesting to developers working with certain specialized kinds of problems.

Migration from Hibernate2 to Hibernate3 will be trivial, we support all existing interfaces, the Hibernate Query Language and mapping files. An update may require some search and replace operations and minor code changes, but we try to make this effort as painless as possible. Hibernate3 will come with new package names, so you might even use Hibernate2 and Hibernate3 at the same time during migration. Hibernate3 will of course support all J2EE application servers, web containers, rich clients, or standalone applications. We strive to integrate easily with other popular Open Source tools and frameworks.

Development on Hibernate3 has already started, a preview release is planned for summer 2004, followed by a beta version. Eventually, a stable release is planned for the fourth quarter 2004 or the first quarter 2005.

Major new features include:

Virtualization (done)

A number of important and interesting problems may be solved by presenting the user with a certain, filtered, subset of the data. For example, a user might want to see data valid at a particular point in time, or may have permissions to view data only in a particular region. Rather than forcing application code to specify this filter criteria in tedious query conditions, Hibernate3 will allow the (parameterized) filters to be applied at the session level.

For example, the following code:

session.enableFilter("region").setParameter("regionCode", "AU");
List regionEmployees = session.createQuery("from Employee").list();

would return just the employees in the AU region, assuming that the Employee class specified a region filter as follows:

<class name="Employee">
    ...
    <filter name="region" condition="REG = :regionCode"/>
</class>

But the actual filter is defined globally, and shared by many class and collection mappings:

<filter-def name="region">
    <filter-param name="regionCode" type="string"/>
</class>

More Mapping Flexibility (done)

For the overwhelming majority of cases, Hibernate2 provides all the O/R mapping options you will need. However, there are now a few new features that are powerful, if used judiciously. They are certainly not to be considered essential, but they round out the structural mapping functionality. This includes:

  • single class to multiple table mappings (the <join> mapping element)
  • efficient table-per-concrete-class mappings with support for polymorphism (the <union-subclass> mapping element)
  • "mixed" table-per-hierarchy / table-per-subclass inheritance mapping strategy
  • powerful "content-based" discrimination for table-per-hierarchy mappings (formula-based discriminators)
  • support for association joins based on SQL formulas and for SQL formulas defined at the <column> level

Representation Independance (done)

Hibernate was conceived as a persistence solution for POJO domain models, and that remains the focus. Occasionally, we run into people who would like to represent their persistent entities in some more dynamic way - as a map, essentially. Hibernate3 lets you represent your domain model as trees of maps, or, with a little bit of user-written code, as just about anything.

  • <dynamic-class> mappings, to allow a persistent HashMap
  • support for "named" entities, so different instances of the same class may be persisted to several tables
  • user-extension framework in the property and proxy package

Statistics reporting and JMX-based monitoring (done)

Hibernate3 reports various statistics using the new Statistics object, and also exposes this functionality via JMX. This feature helps discover performance problems in production applications.

JDK 1.5 Enhancements

The new JDK has been released as a preview earlier this year and we expect a slow migration to the new 1.5 platform throughout 2004. While Hibernate3 still runs perfectly with JDK 1.5, Hibernate3 will make use of some new JDK features. JSR 175 annotations, for example, are a perfect fit for Hibernate metadata and we will embrace them aggressively. We will also support Java generics, which basically boils down to allowing typesafe collections.

Stored Procedure Support (done)

Hibernate3 will allow arbitrary SQL statements to be specified in the mapping document for create, update, and delete operations. This means you will also be able to map entities to custom Stored Procedures.

Full Event Driven Design (done)

Hibernate3 will feature an event-oriented design, with event objects representing any "interesting thing" that occurs in the persistence layer and listener classes that implement standard Hibernate behaviors, or customized user-defined behaviors. This user extension capability has applications ranging from auditing to implementing "strange" cascade semantics.

AST-based HQL parser

HQL is being reimplemented from the ground up, using an ANTLR grammar and AST-based approach. This should allow much better exception reporting for invalid HQL, and allow us to fix a couple of minor limitations of the language, especially the lack of an ON clause.

EJB3-style persistence operations

EJB3 defines the create() and merge() operations, which are slightly different to Hibernate's saveOrUpdate() and saveOrUpdateCopy() operations. Hibernate3 will support all four operations as methods of the Session interface.

Efficient cascade delete (done)

Hibernate3 will allow the use ON DELETE CASCADE foreign key definitions when this is supported by the underlying database.

Support for database-generated GUIDs (done)

The new guid identifier generator supports database-generated GUIDs on Microsoft SQL Server and MySQL.

Documentation of generated SQL (done)

Optionally, Hibernate will generate SQL statements with embedded comments, to make it easy to discover the source of a misbehaving query.

Improvements to custom types (done)

Three minor improvements have been made to custom type support:

  • custom types may now be given short names (the <typedef> mapping element)
  • custom types may now be parametrized, with parameter values specified in the <typedef>
  • UserType now defines additional operations, to allow customization of how the type is stored in the second-level cache

Hibernate 3.1


Enhancements to Criteria query facility

Hibernate 3.1 will add support for projection and other new features to the Criteria query API.

Bulk update and delete

Hibernate 3.1 will introduce support for EJB3-style bulk UPDATE and bulk DELETE queries.

Hibernate EJB3


Hibernate is the most popular object/relational mapping solution for Java, with thousands of deployed systems, an active community of 6000 registered users all over the world, and tens of thousands of developers working with Hibernate day to day.

While looking for proven relational persistence solutions, the EJB3 Expert Group was inspired by this success and picked several key features of Hibernate for inclusion in the next major version of the EJB industry standard. We are very happy to see this first industry-wide effort to integrate Full Object/Relational Mapping into a central Java specification.

The EJB3 specification will support transparent POJO persistence, with a very similar feature set to Hibernate. The EntityManager and Query interfaces are also similar. This means that you will be able to use your Hibernate knowledge when creating EJB3 applications. You will find yourself in a familiar environment with outstanding object/relational mapping features, focused on the best possible integration with relational databases.

One of the key issues the EJB3 Expert Group faced was the easy migration path from the current EJB 2.1 specification. Extensions inspired by the Hibernate Query Language, for example, allow EJB QL to become an extremely powerful query language in EJB3, for experienced EJB developers and Hibernate users alike.

Hibernate will not become dependent on or require a J2EE application server. With Hibernate3, we continue to innovate and spearhead the Java object/relational mapping field, without the burden of a specification. The Hibernate Team and JBoss support the EJB3 effort by participating on the Expert Group, our goal is to create a snapshot of our knowledge and experiences. We will of course also consider and work on actual implementations. A road map and feature overview for this branch will be introduced in the near future, as EJB3 matures.

      

coWiki