fwbrasil / activate

Abandoned: Pluggable persistence in Scala
GNU Lesser General Public License v2.1
299 stars 46 forks source link

PaginatedQuery with all entities #52

Closed odwrotnie closed 11 years ago

odwrotnie commented 11 years ago

How do you paginate over all (no where clause) entities?

odwrotnie commented 11 years ago

Use where (entity isNotNull).

val navigator = paginatedQuery {
    (user: User) =>
      where (user isNotNull) select (user) orderBy (user.lastName)
  }.navigator(10)
fwbrasil commented 11 years ago

For the 1.4 version will be possible to use an empty where() too.