title: how to apply NULLS LAST sorting in Grails/GORM
body: <p>I'm using a Grails DetachedCriteria query, and need to get null values ordered last when sorting descending.  This is against an Oracle database.</p>
  
  <p>Based on the research I've done so far, there is no direct support for this in Hibernate, and hence not in Grails: </p>
  
  <p><a href="https://stackoverflow.com/questions/5787855/grails-hibernate-how-to-order-by-isnullproperty-to-get-nulls-last">Grails/Hibernate: how to order by isnull(property) to get NULLs last?</a></p>
  
  <p>and</p>
  
  <p><a href="https://hibernate.atlassian.net/browse/HHH-2381" rel="nofollow noreferrer">https://hibernate.atlassian.net/browse/HHH-2381</a></p>
  
  <p>Based on these, it seems like my best option is to extend the Order class from Hibernate and add NULLS LAST support myself.  Following that path, can anyone give me an example of how that would be exposed through Grails?  I have very little experience with straight Hibernate, so the examples given are rather difficult to follow.</p>
  
  <p>Alternatively: is there any way in Oracle to specify NULLS LAST sorting within the table definition, via some property on a column or the like?</p>