(Quick Reference)

order

目的
Purpose

Customizes the default sort order of query results.

使用例
Examples

class Book {
    …
    static mapping = {
        order "desc"
    }
}

詳細
Description

Usage: order(string)
使用方法:
Usage:
order(string)

引数:

Arguments:
  • direction - Either "desc" or "asc" for descending and ascending respectively.

By defaults results are sorted in ascending order. With the order method you can alter results to be sorted in descending order. See also the sort method.