Back to directory
ebean-orm avatar

ebean

Ebean ORM. Read more below about its uses, features, and usage.

Clone repository

git clone https://github.com/ebean-orm/ebean.git

1,531

Stars

267

Forks

70

Watchers

Apache-2.0

License

Build Maven Central : ebean License Multi-JDK Build GraalVM Native Image

Build with database platforms

H2Database Postgres MySql MariaDB Oracle SqlServer DB2 LUW Yugabyte

Build with Java Early Access versions

ebean EA datasource EA migration EA test-docker EA ebean-agent EA


Ebean ORM for Java & Kotlin

Multiple abstraction levels: Ebean provides multiple levels of query abstraction ORM Queries, mixed with SQL, DTO Queries, SqlQuery and JDBC. Work at the highest level of abstraction and drop down levels as needed.

Database migrations: Built in DB migration generation and running. Support for "rebase" migrations as well as repeatable, init and 'normal' migrations.

Awesome SQL: Ebean produces SQL that you would hand craft yourself. Use great SQL, never generate SQL cartesian product, always honor relational limit/offset.

Automated query tuning: For ORM queries Ebean can profile the object graph being used and either automatically tune the query.

Docker test containers: Docker test containers for all the supported databases. Get 100% test coverage on all the features of the database we use.

Type safe queries: We can build queries using type safe query beans. IDE auto-complete when writing queries, compile time checking and it's FUN.

Performance isn't optional: Optimise queries to only fetch what we need (partial objects). Automatically avoid N+1 via a smart load context.

Benefits of ORM

  • Automatically avoid N+1
  • L2 caching to reduce database load
  • Queries mixing database and L2 cache
  • Automatically tune ORM queries
  • Elasticsearch for search or L3 cache

Sponsors

foconis analytics quer logo med principal logo timerbee

Need help?

Post questions or issues to the Ebean google group or github discussions

Documentation

Goto https://ebean.io/docs/

Guides

Library reference (capabilities, scope, and AI guidance): docs/LIBRARY.md

Step-by-step guides for common tasks: docs/guides/

Available guides:

Maven central

Maven central - g:io.ebean

Building Ebean from source

  • JDK 11 or higher installed
  • Maven installed
  • git clone [email protected]:ebean-orm/ebean.git
  • mvn clean install

Ebean 13 uses Java modules with module-info. This means that there are stricter compilation rules in place now than when building with classpath pre version 13.

For Maven Surefire testing we use <surefire.useModulePath>false</surefire.useModulePath> such that tests run using classpath and not module-path. We are doing this until all the tooling (Maven, IDE) improves in the area of testing with module-info.

Eclipse IDE

Right now we can't use Eclipse IDE to build Ebean and run its tests due to its poor support for java modules. See ebean/issues/2653

The current recommendation is to use IntelliJ IDEA as the IDE to build and hack Ebean.

IntelliJ IDEA

We want to get IntelliJ to run tests using classpath similar to Maven Surefire. To do this set: JUnit -> modify options -> Do not use module-path option

To set this option as the global default for IntelliJ use:

Run - Edit Configurations -> Edit configuration templates -> JUnit -> modify options - Do not use module-path option

end

Releases

Aug 17, 2026

18.5.0 | 19.5.0

Download .zip

What's Changed

Metrics - support both CUMULATIVE and DELTA metrics collection concur… by @rbygrave in #3878 Add dbName() to MetaQueryPlan - easier to support multi-db query plan… by @rbygrave in #387...

Jul 28, 2026

18.4.0 | 19.4.0

Download .zip

What's Changed

Build(deps-dev): Bump com.fasterxml.jackson.core:jackson-databind from 2.22.0 to 2.22.1 in /ebean-spring-txn by @dependabot[bot] in #3862 Change MappedQuery to extend CancelableQuery -...

Jul 20, 2026

18.3.0 | 19.3.0

Download .zip

What's Changed

Fix test-java16 parent etc by @rbygrave in #3831 ebean-redisson - initial commit (#3711) by @dragkes in #3829 #3529 - Fix for M2M property is empty in preDelete of BeanPersistAdapter b...

Jul 3, 2026

18.2.0 | 19.2.0

Download .zip

What's Changed

Add tenant-partitioned L2 caches (#2956) by @rbygrave in #3809 Tenant support for query plans by @rbygrave in #3810 IMPROVED: Tenant support for query plans by @rPraml in #2955 Invalid...

Jul 1, 2026

18.1.0 | 19.1.0

Download .zip

What's Changed

Add support for @formula2 with logical paths and automatic joins by @rob-bygrave in #3791 Add support for Java 21 SequencedSet and SequencedMap by @rbygrave in #3302 Two related tidy-u...