|
Road Map
Note that this page is mainly intended as a macro view of features we would like to implement moving forward; it is a blog of sorts. For detailed roadmap information, please see the Hibernate or NHibernate issue tracking systems. Hibernate 2.1Hibernate2 is a stable and complete object/relational mapping solution with all functionality needed by a typical Java application. Hibernate 2.x is no longer being actively developed. We recommend and encourage Hibernate users to consider migrating to Hibernate3. Hibernate 3.0Hibernate3 makes it easier than ever before for Java applications to interact with persistent data, allowing a single definition of the transformation between various in-memory representations of the entity data and the relational schema, even in the case of very complex legacy schemas and schemas for historical data or data with visibility rules. Hibernate3 also provides the most comprehensive object/relational query functionality, with three full-featured query facilities: Hibernate Query Language, the newly enhanced Hibernate Criteria Query API, and enhanced support for queries expressed in the native SQL dialect of the database. Hibernate 3.0 has been released in Q1 2005 and is considered stable for development and production. See the migration guide for update information if you are using Hibernate 2.x. Major new features in Hibernate 3.0 include: Virtualization 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 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:
Representation Independence 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.
In particular, Hibernate now supports the mapping of dom4j XML trees directly to the relational database.
Statistics reporting and JMX-based monitoring 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. A second-level cache and query cache browser is also provided. 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.2, 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. Support for Stored Procedures and hand-written SQL Hibernate3 allows 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. Furthermore, any named SQL or HQL query may be specified as the query to use for loading an entity by primary key. Finally, the native SQL query facility has been enhanced, including support for returning simple scalar values and loading collections. This means it is possible to override any SQL generated by Hibernate with handwritten SQL. Full Event Driven Design Hibernate3 features 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. JACC/JAAS based security model Hibernate3 allows CRUD operations for entities to be permissioned in a J2EE environment. 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. Subselect fetching As an alternative to batch fetching, subselect fetching allows efficient fetching of collections. Efficient cascade delete Hibernate3 allows the use ON DELETE CASCADE foreign key definitions when this is supported by the underlying database. Column-level lazy fetching This is a checkbox feature that Hibernate needs for marketing purposes. Any property may be marked lazy="true", and will be fetched from the database when the field is first accessed. This feature requires build-time bytecode instrumentation using an Ant task. If Hibernate encounters uninstrumented classes at runtime, the feature will be transparently disabled. Ease of use We have made Hibernate easier for new users, by simplifying two areas which often cause problems:
Default values are now much more sensible and it is now not usually necessary to specify the lazy or unsaved-value attributes, or implement Interceptor.isUnsaved(). Revamped criteria query API The Criteria API has been heavily upgraded in Hibernate3. In particular:
Better support for CMT Hibernate3 may be configured to automatically flush and close the session in a CMT environment, eliminating noisy exception and transaction handling code. Support for database-generated GUIDs The new guid identifier generator supports database-generated GUIDs on Microsoft SQL Server and MySQL. Documentation of generated SQL 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 Three minor improvements have been made to custom type support:
Better support for cursors Hibernate 2.1.6 provides a much improved implementation of Query.scroll(). Hibernate3 capitalizes upon this by also supporting the use of scroll() with native SQL and Criteria queries. Introduction of CacheMode It is possible to control the interaction between the session and second-level cache, dynamically, by specifying a CacheMode. Support for update by ROWID on Oracle Hibernate3 can use the Oracle ROWID in SQL UPDATE statements. Bulk update and delete queries HQL now supports EJB3-style bulk UPDATE and bulk DELETE queries. Hibernate 3.1Hibernate 3.1 is the world's most sophisticated ORXM (Object/Relational/XML Mapping) solution. Hibernate 3.1 is an evolutionary update of Hibernate 3.0. The focus is upon features for offline batch processing. New StatelessSession API For bulk/batch processing HQL bulk operations
Break processing Support for FETCH JOIN in queries called using scroll() HQL with clause To add "extra" restrictions to an association join Support for huge collections Introduction of lazy="extra" for collection mappings Schema Validation Hibernate may now automatically validate mappings against an existing database schema, to make testing your mappings a breeze. Hibernate 3.2The main focus for the Hibernate Core 3.2 release is Java Persistence compliance. (TBC) Hibernate AnnotationsAfter the 3.2.0.GA release, the focus of Hibernate Annotations are improvements to Hibernate Lucene and Hibernate Validator. Hibernate LuceneLucene is a powerful index based search engine but requires you to manually populate the index and keep it in sync with your database state. Besides that, when querying a Lucene index, you end up manipulating Lucene Document and no your actual OO Domain Model. Hibernate Lucene aims to solve both issues by keeping the Lucene index up to date with the changes made through Hibernate. It also allows you to query the Lucene index are get managed entities as a result. 3.2.0.GA contains a synchronized implementation that keep the Lucene index up to date Hibernate Lucene 3.3 series will contains support for:
We are interested to hear your feedback http://forum.hibernate.org Hibernate ValidatorHibernate Validator still have room for improvement and will implement JSR 303: Bean Validation when ideas will converge in the Expert Group. We are interested to hear your feedback http://forum.hibernate.org Hibernate AnnotationsSome Hibernate specific features still have no Annotation representations esp:
Hibernate EntityManagerHibernate EntityManager primary goal (EJB 3.0 implementation) is now achieved. However, we are open to user feedbacks to make Hibernate EntityManager evolved (and as breeding-ground of features to be contributed back to a future revision of the specification) Hibernate ToolsReverse engineering from JDBC into Hibernate mapping metadata
Template-based code generation
Ant-based tasks
Eclipse integration
Metadata/mapping editor
Hibernate Console
Statistics and event viewer
NHibernate 1.0NHibernate 1.0 is a source port of Hibernate 2.1 to .NET Framework version 1.1. It is a stable and complete object/relational mapping solution with all functionality needed by a typical .NET web application. NHibernate 1.2The 1.2 series of releases of NHibernate brought many improvements and new features:
NHibernate 2.0The upcoming NHibernate 2.0 release will add support for many more exciting features; some are ported from Hibernate 3.x, others are features unique to NHibernate. Core
Sub-projects
Future VersionsThe following features are being considered for future versions of NHibernate:
Help is always welcome and contributed patches will be applied as soon as possible, provided they are in good shape. If you need some guidance on how to get started with the NHibernate source code, please have a read of this article: http://www.hibernate.org/428.html. JIRA issue NH-616 (Entry-Level Task List) lists some easy issues that you could work on if you want to contribute but don't know where to start. |
||||||||