Browse files

BUG When selecting stage_unique from Versioned the augmentSQL functio…

…n would permanantly alter the DataQuery while doing a recursive augmentSQL. This fix correctly maintains the correct Versioned.mode so that subsequent calls to this function exhibit the same expected behaviour.
  • Loading branch information...
1 parent 6aa16e1 commit b01b91ffc376b7a047f9a7c910593c13ce63bc4c @tractorcow tractorcow committed Dec 17, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 model/Versioned.php
1 model/Versioned.php
@@ -203,6 +203,7 @@ public function augmentSQL(SQLQuery &$query, DataQuery &$dataQuery = null) {
// below)
$dataQuery->setQueryParam('Versioned.mode', 'stage');
$this->augmentSQL($query, $dataQuery);
+ $dataQuery->setQueryParam('Versioned.mode', 'stage_unique');
// Now exclude any ID from any other stage. Note that we double rename to avoid the regular stage rename
// renaming all subquery references to be Versioned.stage

0 comments on commit b01b91f

Please sign in to comment.