Grails

dynamic finders only work with 2 fields maximum - this should be documented

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 1.0-RC3
  • Fix Version/s: 1.2 final
  • Component/s: Documentation
  • Labels:
    None
  • Environment:
    all

Description

you can't do
findByNameAndCodeAndState

because dynamic finders only work to a maximum of 2 fields.
It shold be documented (or modified)

Activity

Hide
Peter Ledbrook added a comment -

When fixing this issue, don't forget to update the documentation.

Show
Peter Ledbrook added a comment - When fixing this issue, don't forget to update the documentation.
Hide
Sven Hohlfeld added a comment -

This topic has been discussed on the user mailing list.

The actual suggestion for a correct dynamic finder formular in the documentation is:

Book.findBy([Property][Comparator][Boolean Operator])?[Property][Comparator] (see http://grails.org/doc/1.0.x/guide/single.html#5.4.1%20Dynamic%20Finders "Method expressions" for the current state of the documentation.

Here is the link into the mail thread which contains the full discussion. http://www.nabble.com/Problem-with-more-than-two-parameters-in-dynamic-finders-to16517807.html#a16517807

Best regards

Sven

Show
Sven Hohlfeld added a comment - This topic has been discussed on the user mailing list. The actual suggestion for a correct dynamic finder formular in the documentation is: Book.findBy([Property][Comparator][Boolean Operator])?[Property][Comparator] (see http://grails.org/doc/1.0.x/guide/single.html#5.4.1%20Dynamic%20Finders "Method expressions" for the current state of the documentation. Here is the link into the mail thread which contains the full discussion. http://www.nabble.com/Problem-with-more-than-two-parameters-in-dynamic-finders-to16517807.html#a16517807 Best regards Sven
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
Hide
Jeff Brown added a comment -

Section 5.4.1 of the user guide currently says...

"At the moment, you can only use dynamic finders with a maximum of two criteria, i.e. the method name can only have one boolean operator."

I think this correctly describes the current implementation.

Show
Jeff Brown added a comment - Section 5.4.1 of the user guide currently says... "At the moment, you can only use dynamic finders with a maximum of two criteria, i.e. the method name can only have one boolean operator." I think this correctly describes the current implementation.

People

Vote (1)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: