Permalink
Browse files

MINOR Quoting relation tables in new ManyManyList API

  • Loading branch information...
1 parent df56eb5 commit 0a8a17833ff386089bf117c4508b057a725819dd @chillu chillu committed Oct 7, 2011
Showing with 3 additions and 3 deletions.
  1. +2 −2 model/ManyManyList.php
  2. +1 −1 security/Member.php
@@ -113,7 +113,7 @@ function remove($item) {
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 @@ function removeByID($itemID) {
* @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();
View
@@ -1412,7 +1412,7 @@ public function setForeignID($id) {
// 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();

0 comments on commit 0a8a178

Please sign in to comment.