Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

FIXED: Issue where versioned would join _versions tables on ID,Versio…

…n instead of RecordID,Version
  • Loading branch information...
commit c55b018feb0f89541f1524ba2a744f0b992c6eef 1 parent 22c5f31
@tractorcow tractorcow authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  model/Versioned.php
View
3  model/Versioned.php
@@ -145,7 +145,8 @@ function augmentSQL(SQLQuery &$query, DataQuery &$dataQuery = null) {
$date = $dataQuery->getQueryParam('Versioned.date');
foreach($query->getFrom() as $table => $dummy) {
$query->renameTable($table, $table . '_versions');
- $query->replaceText("\"$table\".\"ID\"", "\"$table\".\"RecordID\"");
+ $query->replaceText("\"{$table}_versions\".\"ID\"", "\"{$table}_versions\".\"RecordID\"");
+ $query->replaceText("`{$table}_versions`.`ID`", "`{$table}_versions`.`RecordID`");
// Add all <basetable>_versions columns
foreach(self::$db_for_versions_table as $name => $type) {
Please sign in to comment.
Something went wrong with that request. Please try again.