Grails

mention that criteria implies conjunction of the restrictions

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.2.1
  • Component/s: Documentation
  • Labels:
    None

Description

The section on criteria in the User's Guide contains this example:

def c = Account.createCriteria()
def results = c {
        like("holderFirstName", "Fred%")
        and {
                between("balance", 500, 1000)
                eq("branch", "London")
        }
        maxResults(10)
        order("holderLastName", "desc")
}

This is a little contrived since a conjunction is implied at the top level, so the "and" node could be eliminated. The same example also occurs in the secition on createCriteria.

Also the fact that conjunction is implied could be noted in the Guide, since it's not evident.

Activity

Hide
Graeme Rocher added a comment -

Assigning all documentation related issues to 1.2 final since they don't represent a change to the codebase

Show
Graeme Rocher added a comment - Assigning all documentation related issues to 1.2 final since they don't represent a change to the codebase

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: