mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge pull request #620 from wernerkrauss/patch-1
FIX: augmentLoadLazyFields doesn't work with renamed tables
This commit is contained in:
commit
46f2608cfa
@ -57,9 +57,10 @@ class BlogPostFilter extends DataExtension
|
|||||||
*/
|
*/
|
||||||
public function augmentLoadLazyFields(SQLSelect &$query, DataQuery &$dataQuery = null, $dataObject)
|
public function augmentLoadLazyFields(SQLSelect &$query, DataQuery &$dataQuery = null, $dataObject)
|
||||||
{
|
{
|
||||||
|
$blogPostTable = DataObject::getSchema()->tableName(BlogPost::class);
|
||||||
$dataQuery->innerJoin(
|
$dataQuery->innerJoin(
|
||||||
DataObject::getSchema()->tableName(BlogPost::class),
|
$blogPostTable,
|
||||||
'"SiteTree"."ID" = "BlogPost"."ID"'
|
'"SiteTree"."ID" = "' . $blogPostTable . '"."ID"'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user