mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Remove having clause as it can't be used
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47939 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9a36047021
commit
bc7861be9f
@ -863,7 +863,7 @@ class DataObject extends Controller implements DataObjectInterface {
|
|||||||
*
|
*
|
||||||
* @todo Implement query-params
|
* @todo Implement query-params
|
||||||
*/
|
*/
|
||||||
public function getManyManyComponents($componentName, $filter = "", $sort = "", $join = "", $limit = "", $having = "") {
|
public function getManyManyComponents($componentName, $filter = "", $sort = "", $join = "", $limit = "") {
|
||||||
if(isset($this->components[$componentName])) return $this->components[$componentName];
|
if(isset($this->components[$componentName])) return $this->components[$componentName];
|
||||||
|
|
||||||
list($parentClass, $componentClass, $parentField, $componentField, $table) = $this->many_many($componentName);
|
list($parentClass, $componentClass, $parentField, $componentField, $table) = $this->many_many($componentName);
|
||||||
@ -880,8 +880,7 @@ class DataObject extends Controller implements DataObjectInterface {
|
|||||||
"`$table`.$parentField = $this->ID", // filter
|
"`$table`.$parentField = $this->ID", // filter
|
||||||
$sort,
|
$sort,
|
||||||
$limit,
|
$limit,
|
||||||
"INNER JOIN `$table` ON `$table`.$componentField = `$componentBaseClass`.ID", // join
|
"INNER JOIN `$table` ON `$table`.$componentField = `$componentBaseClass`.ID" // join
|
||||||
$having // having
|
|
||||||
);
|
);
|
||||||
array_unshift($query->select, "`$table`.*");
|
array_unshift($query->select, "`$table`.*");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user