Skip to content
Browse files

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

…ss-db behaviour.
  • Loading branch information...
1 parent f6334dd commit dd302a68a7b86e58caa1d31f06396f18e596ec7e @sminnee sminnee committed Aug 21, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 model/Versioned.php
1 model/Versioned.php
@@ -228,6 +228,7 @@ function augmentSQL(SQLQuery &$query, DataQuery &$dataQuery = null) {
$query->selectField(sprintf('"%s_versions"."%s"', $baseTable, $name), $name);
$query->selectField(sprintf('"%s_versions"."%s"', $baseTable, 'RecordID'), "ID");
+ $query->addOrderBy(sprintf('"%s_versions"."%s"', $baseTable, 'Version'));
// latest_version has one more step
// Return latest version instances, regardless of whether they are on a particular stage

0 comments on commit dd302a6

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