Sorting method for DataMapper models