graemerocher opened a new issue, #14659:
URL: https://github.com/apache/grails-core/issues/14659

   Original Reporter: overzealous
   Environment: Not Specified
   Version: 2.0.4
   Migrated From: http://jira.grails.org/browse/GRAILS-9171
   
   There should be a standard way to handle case-insensitive sorting in both 
`Criteria` and `DetachedCriteria`.
   
   Currently, standard `Criteria` only supports case-insensitive sorting using 
this awkward syntax:
   
   ```
   import org.hibernate.criterion.Order
   ...
   
   order(new Order(param, dir=='asc').ignoreCase())
   ```
   
   `DetachedCriteria` provides no way to support case-insensitive sorting at 
all.
   
   I recommend following the format used by `eq`:
   
   ```
   order(param, dir, [ignoreCase: true])
   ```
   
   For normal `Criteria`, this is as simple as calling `ignoreCase()` on the 
new `Order` object.  For `DetachedCriteria`, the way sorting is stored will 
need to be modified to include tracking this additional information. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to