Ebean ORM for Java/Kotlin

Fast and simple data access on the JVM

Current version -

About Ebean

JPA Mapping

Ebean uses JPA mapping annotations.

@Entity
@Table(name="customer")
public class Customer extends BaseModel {

  @Column(length=100)
  String name;

  @ManyToOne(cascade=CascadeType.ALL)
  Address billingAddress;

  @OneToMany(mappedBy="customer")
  List<Contact> contacts;
  ...

Simple to use

Ebean provides a simpler programming model that developers can understand and master quickly.

Type safe queries

Query beans

Use Query beans to build queries in a type safe manner.

LocalDate lastWeek = ...;

List<Customer> customers
  = new QCustomer()
    .name.istartsWith("rob")
    .billingAddress.city.equalTo("Auckland")
    .status.isEqualTo(Status.NEW)
    .registered.before(lastWeek)
    .setMaxRows(10)
    .orderBy()
      .name.asc()
      .id.desc()
    .findList();