silverstripe/silverstripe-framework — pull request #3497 by jedateach (2014-09-19 02:23:38+00:00)
Title: Fix for Versioned->allVersions to work with new ORM

The context for this is that I wanted to show a history of changes for a "Product" page type.
The joined data was either missing, or was incorrect because it came from the wrong records.

I checked out the SQL, and found joins were using `Table_versiones.ID` field, rather than `Table_versions.RecordID` AND `Table_versions.Version`.

Turned out it was using the joins generated by the ORM, rather than replacing with LEFT JOINS. The reason being that the query $tableJoin data is now stored as an array, rather than a string.

Yes, needs unit tests! Just getting the problem out there for now.