Grails

Add default sort and order by property to domain classes

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 0.3.1
  • Fix Version/s: 1.2-M3
  • Component/s: Persistence
  • Labels:
    None

Description

I would be nice if you could specify a default sort and order for domain classes, like:

class NewsArticle { static defaultSort = 'publishedAt' static defaultOrder = 'desc' String title Date publishedAt .... }

Issue Links

Activity

Hide
Dennis Carroll added a comment -

I could not get JIRA to display the attach link without cloning the issue on which I commented. The attachment has a "process.txt" in the root that document what I did to create the "books" project. I could not see where in your source the sort testing is done. I you would be so kind as to point me there perhaps I can find where I am going off track.

Thanks for the hard work,

Show
Dennis Carroll added a comment - I could not get JIRA to display the attach link without cloning the issue on which I commented. The attachment has a "process.txt" in the root that document what I did to create the "books" project. I could not see where in your source the sort testing is done. I you would be so kind as to point me there perhaps I can find where I am going off track. Thanks for the hard work,

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: