BUG When selecting stage_unique from Versioned the augmentSQL function 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.

This commit is contained in:
Damian Mooyman 2012-12-18 10:11:30 +13:00
parent 6aa16e1f01
commit b01b91ffc3

View File

@ -203,6 +203,7 @@ class Versioned extends DataExtension {
// below) // below)
$dataQuery->setQueryParam('Versioned.mode', 'stage'); $dataQuery->setQueryParam('Versioned.mode', 'stage');
$this->augmentSQL($query, $dataQuery); $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 // 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 // renaming all subquery references to be Versioned.stage