Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 2.0 final
-
Fix Version/s: 2.0.4
-
Component/s: Persistence, Testing
-
Labels:None
Description
A query like Person.findAllByX('foo', [sort: 'x']) will sort results correctly but when using findBy to return a single result the result will be the first matching object that was inserted. I guess the sort is being applied after the query returns the results.
Test app attached.
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
Fix available in a pull request for grails-data-mapping: https://github.com/SpringSource/grails-data-mapping/pull/44