Note that you are allowed to add additional clauses using where() as well as use fetch() and setOrderBy() after the query has been created.
Note that this method signature used to map to named queries and that has moved to {@link #createNamedQuery(Class,String)}.
EbeanServer ebeanServer = ... ; String q = "find order fetch details where status = :st"; List<Order> newOrders = ebeanServer.createQuery(Order.class, q) .setParameter("st", Order.Status.NEW) .findList();@param query the object query
null
if no criteria
@return query
CriteriaQuery
object.
@return criteria query object
filter
. The created query is a root query.
@param filter the filter that is to be wrapped in a new query
@return a query that is wrapping filter
try (Connection con = sql2o.open()) { return sql2o.createQuery(query, name, returnGeneratedKeys).executeAndFetch(Pojo.class); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|