Removing join() on DataList/DataQuery

Use leftJoin() or innerJoin() instead
This commit is contained in:
Sean Harvey 2012-11-15 11:43:43 +13:00
parent b43b023c1e
commit 68bb74820a
2 changed files with 0 additions and 32 deletions

View File

@ -233,20 +233,6 @@ class DataList extends ViewableData implements SS_List, SS_Filterable, SS_Sortab
return false;
}
/**
* Return a new DataList instance with a join clause added to this list's query.
*
* @param type $join Escaped SQL statement
* @return DataList
* @deprecated 3.0
*/
public function join($join) {
Deprecation::notice('3.0', 'Use innerJoin() or leftJoin() instead.');
return $this->alterDataQuery_30(function($query) use ($join){
$query->join($join);
});
}
/**
* Return a new DataList instance with the records returned in this query restricted by a limit clause
*

View File

@ -530,24 +530,6 @@ class DataQuery {
return $this;
}
/**
* Add a join clause to this query
* @deprecated 3.0 Use innerJoin() or leftJoin() instead.
*/
public function join($join) {
Deprecation::notice('3.0', 'Use innerJoin() or leftJoin() instead.');
if($join) {
$this->query->addFrom($join);
// TODO: This needs to be resolved for all databases
if(DB::getConn() instanceof MySQLDatabase) {
$from = $this->query->getFrom();
$this->query->setGroupBy(reset($from) . ".\"ID\"");
}
}
return $this;
}
/**
* Add an INNER JOIN clause to this query.
*