Skip to content
This repository
Browse code

BUGFIX: Ensure that all_versions are sorted explicitly for better cro…

…ss-db behaviour.
  • Loading branch information...
commit dd302a68a7b86e58caa1d31f06396f18e596ec7e 1 parent f6334dd
Sam Minnée authored August 21, 2012

Showing 1 changed file with 1 addition and 0 deletions. Show diff stats Hide diff stats

  1. 1  model/Versioned.php
1  model/Versioned.php
@@ -228,6 +228,7 @@ function augmentSQL(SQLQuery &$query, DataQuery &$dataQuery = null) {
228 228
 				$query->selectField(sprintf('"%s_versions"."%s"', $baseTable, $name), $name);
229 229
 			}
230 230
 			$query->selectField(sprintf('"%s_versions"."%s"', $baseTable, 'RecordID'), "ID");
  231
+			$query->addOrderBy(sprintf('"%s_versions"."%s"', $baseTable, 'Version'));
231 232
 			
232 233
 			// latest_version has one more step
233 234
 			// Return latest version instances, regardless of whether they are on a particular stage

0 notes on commit dd302a6

Please sign in to comment.
Something went wrong with that request. Please try again.