Query abstraction levels

Ebean provides multiple levels of abstraction from ORM Queries, to using a bit of SQL in our ORM query and all the way down to using straight SQL queries with beans at all and down to JDBC directly.

As developers we want to stay at the highest abstraction layer (ORM queries) but as needs occur we can drop down into bits of SQL and full SQL as needed.

ORM queries
  • Pure ORM queries
  • Some SQL in the select or where clause
  • Using SQL (aka find native)
DTO queries
  • Using SQL
SqlQuery
  • SqlQuery using SqlRow
  • SqlQuery using RowMappers
JDBC queries
  • Straight use of JDBC

Edit Page