Skip to content

Commit

Permalink
FIX Use baseDataClass for allVersions as with other methods
Browse files Browse the repository at this point in the history
  • Loading branch information
dhensby committed Dec 5, 2017
1 parent 2538f59 commit 84d7afb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/Versioned.php
Expand Up @@ -1050,7 +1050,7 @@ public function allVersions($filter = "", $sort = "", $limit = "", $join = "", $
$oldMode = self::get_reading_mode();
self::reading_stage('Stage');

$list = DataObject::get(get_class($this->owner), $filter, $sort, $join, $limit);
$list = DataObject::get(ClassInfo::baseDataClass($this->owner), $filter, $sort, $join, $limit);
if($having) $having = $list->having($having);

$query = $list->dataQuery()->query();
Expand Down

0 comments on commit 84d7afb

Please sign in to comment.