(Quick Reference)

findAll

Purpose

Finds all of the domain class instances for the specified query

Examples

// 10 books from Dan Brown staring from 5th book ordered by release date
Book.findAll([author:'Dan Brown'],[max:10,offset:5,sort:'releaseDate'])

Description

Book.findAll( Map query )
Book.findAll( Map query, Map queryParams )

Parameters:

  • query - A filter for querying
  • queryParams - A Map containing parameters max, offset, sort and validate (to turn off morphia mapping validation)