mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Quoting relation tables in new ManyManyList API
This commit is contained in:
parent
df56eb540a
commit
0a8a17833f
@ -113,7 +113,7 @@ class ManyManyList extends RelationList {
|
||||
function removeByID($itemID) {
|
||||
if(!is_numeric($itemID)) throw new InvalidArgumentException("ManyManyList::removeById() expecting an ID");
|
||||
|
||||
$query = new SQLQuery("*", array($this->joinTable));
|
||||
$query = new SQLQuery("*", array("\"$this->joinTable\""));
|
||||
$query->delete = true;
|
||||
|
||||
if($filter = $this->foreignIDFilter()) {
|
||||
@ -131,7 +131,7 @@ class ManyManyList extends RelationList {
|
||||
* @deprecated this is experimental and will change. Don't use it in your projects.
|
||||
*/
|
||||
function removeByFilter($filter) {
|
||||
$query = new SQLQuery("*", array($this->joinTable));
|
||||
$query = new SQLQuery("*", array("\"$this->joinTable\""));
|
||||
$query->delete = true;
|
||||
$query->where($filter);
|
||||
$query->execute();
|
||||
|
@ -1412,7 +1412,7 @@ class Member_GroupSet extends ManyManyList {
|
||||
|
||||
// Find directly applied groups
|
||||
$manymanyFilter = $this->foreignIDFilter();
|
||||
$groupIDs = DB::query('SELECT "GroupID" FROM Group_Members WHERE ' . $manymanyFilter)->column();
|
||||
$groupIDs = DB::query('SELECT "GroupID" FROM "Group_Members" WHERE ' . $manymanyFilter)->column();
|
||||
|
||||
// Get all ancestors
|
||||
$allGroupIDs = array();
|
||||
|
Loading…
Reference in New Issue
Block a user