code: private static void addOrderPossiblyNested(AbstractHibernateDatastore datastore, Criteria c, Class<?> targetClass, String sort, String order, boolean ignoreCase) {
          int firstDotPos = sort.indexOf(".");
          if (firstDotPos == -1) {
              addOrder(c, sort, order, ignoreCase);
          } else { // nested property
              String sortHead = sort.substring(0,firstDotPos);
              String sortTail = sort.substring(firstDotPos+1);
              PersistentProperty property = getGrailsDomainClassProperty(datastore, targetClass, sortHead);
              if (property instanceof Embedded) {
                  // embedded objects cannot reference entities (at time of writing), so no more recursion needed
                  addOrder(c, sort, order, ignoreCase);
              } else if(property instanceof Association) {
                  Criteria subCriteria = c.createCriteria(sortHead);
                  Class<?> propertyTargetClass = ((Association)property).getAssociatedEntity().getJavaClass();
                  GrailsHibernateUtil.cacheCriteriaByMapping(datastore, propertyTargetClass, subCriteria);
                  addOrderPossiblyNested(datastore, subCriteria, propertyTargetClass, sortTail, order, ignoreCase); // Recurse on nested sort
              }
          }
      }
docs: Add order to criteria, creating necessary subCriteria if nested sort property (ie. sort:'nested.property').