Robin has posted 6 posts at DZone. View Full User Profile

Ebean ORM v0.9.8

  • submit to reddit

Ebean ORM adds support for Enhancement via javaagent, Eclipse IDE Plugin and ANT task to existing Subclass Generation approach.

The User Guide includes a section on "Enhancement vs Subclass Generation and Field access vs Property access". These are good topics to review if you get a chance, all feedback welcome. Thanks!

Published at DZone with permission of its author, Robin Bygrave.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Robin Bygrave replied on Sun, 2008/11/02 - 3:09am

For those not familiar with Ebean ORM... a summary of the main differences between Ebean and JPA/Hibernate 

1. Ebean is architected without a "session object".

That means Ebean has no object similar to a JPA EntityManager or Hibernate Session.So with Ebean there is no concept of attached/detached beans, so no merging or flushing etc. IMO this makes Ebean easier to understand and use.The "sessionless" approach is the major difference which I don't see going away.

2. Ebean  has "Autofetch" support built in.

"Autofetch" is a mechanism where the query is automatically tuned for you. Essentially the fetch joins are automatically tuned for you to reduce lazy loading and improve performance. This occurs by the ORM profiling the object graph use and using this information to produce optimised queries automatically. This also fixes one of the issues with the DAO pattern as queries can be tuned per callStack.

Ebean also supports "Partial Objects" so the optimised queries only include the properties that the application actually uses. 

3. "Partial Object" support

Ebean supports "Partial Object" queries so that any node in the object graph can be partially populated. This is currently not possible with JPQL and the reason Ebean has not followed JPQL (that is, it's hard to see how JPQL will evolve to support partial object queries similar to Ebean but time will tell on that one). 

This improves performance (queries only include the columns used by that part of the application) and also the design by reducing the need for secondary table properties.  

There are a number of other features not currently in JPA such as large query support (per object graph persistence context) and control over batching and cascading behaviour.

Cheers, Rob.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.