Videos to show you various features of Ebean and options for testing.
Ebean has an taken a different architectural when compared with JPA and JDO and this has important implications.
Specifically Ebean does not use a 'Persistence Context' or 'Session' when it persists objects back to the database.
This means you don't need to attach/detach your beans or manage a JPA EntityManager or JDO PersistenceManager.
Persisting a bean means you just call save(). Cascade persistence is supported by traversing the relationships
on the bean. It is easy to use and
Partial objects are very important for a high performance ORM and Ebean has this as the bases of its design.
The query language makes it trivial to fetch only the properties you want and partial objects are supported
through-out. JPA FetchGroups are trying to do the same task but look like a last minute add-on - partial
object support needs to be part of the query language for a high performance ORM.
Query Language Design
The Ebean query language was designed to make is easier to use. The developer specifies the parts of the
object graph they want to fetch, the predicates and the order by and then Ebean figures out all the underlying
joins that are required and if the joins need to be inner or outer joins. This makes is much easier for the
developer to use.
Raw SQL: Using raw sql is easy and the bean returned are fully featured with
the expected lazy loading and persisting support because sometimes you need full control
Paging results: Use findRowCount() or findPagedList() to make handling paged results easy.
Large Query Support: Use findIterate() to process lots of objects without
having them all in memory. Typically for batch processing requirements.
Batch inserting: Ability to tune batch inserting with per-transaction control over
JDBC batch size and the ability to turn off getGeneratedKeys and Cascade persist.
DB Encryption: Use DB encryption transparently with @Encrypt.
JSON support: Built in JSON support. Marshalling/unmarshalling is fully aware of
circular relationships, inheritance, partial objects and all data types.
Automatic Query Tuning: Has 'Autofetch' automatic query tuning support. Queries can be
automatically optimised based on profiling the object graph use.
Stateless Updates: Populate a bean object graph and then update() it without querying it
from the DB. This is useful to support REST.
Bulk Updates/Deletes: Use bulk update statements as you desire because sometimes a more
'relational' approach is vastly more efficient - Ebean is happy with that and the L2 cache will invalidate
the appropriate cache regions where necessary.