Details
-
Type:
Sub-task
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 1.0.2
-
Fix Version/s: 1.1-beta1
-
Component/s: Persistence
-
Labels:None
-
Environment:Linux JDK 1.6
Description
This would be quite useful in some cases, as currently default sorting can only be done via Java (using a SortedSet and implementing comparable on the collection's entities).
Hibernate supports this via the OrderBy annotation, so the only work is to create the glue between Grails and Hibernate (this would probably be part of the GORM DSL I guess). I can provide an example Hibernate mapping file for this if needed, or the following links show how to achieve that:
http://www.hibernate.org/hib_docs/v3/reference/en/html/collections.html#collections-mapping (XML mapping)
http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#entity-mapping-association-collections (Annotations)
Issue Links
- duplicates
-
GRAILS-504
Add default sort and order by property to domain classes
-
-
GRAILS-3722
Add default sort and order by property to domain classes
-
-
GRAILS-3940
Add default sort and order by property to domain classes
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
new features go into 1.1