mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Fixed DataList::relation().
This commit is contained in:
parent
25018180c5
commit
8db236f444
@ -25,7 +25,7 @@ class HasManyList extends RelationList {
|
|||||||
// Apply relation filter
|
// Apply relation filter
|
||||||
if(is_array($this->foreignID)) {
|
if(is_array($this->foreignID)) {
|
||||||
return "\"$this->foreignKey\" IN ('" .
|
return "\"$this->foreignKey\" IN ('" .
|
||||||
implode(', ', array_map('Convert::raw2sql', $this->foreignID)) . "')";
|
implode("', '", array_map('Convert::raw2sql', $this->foreignID)) . "')";
|
||||||
} else if($this->foreignID){
|
} else if($this->foreignID){
|
||||||
return "\"$this->foreignKey\" = '" .
|
return "\"$this->foreignKey\" = '" .
|
||||||
Convert::raw2sql($this->foreignID) . "'";
|
Convert::raw2sql($this->foreignID) . "'";
|
||||||
|
@ -52,7 +52,7 @@ class ManyManyList extends RelationList {
|
|||||||
// Apply relation filter
|
// Apply relation filter
|
||||||
if(is_array($this->foreignID)) {
|
if(is_array($this->foreignID)) {
|
||||||
return "\"$this->joinTable\".\"$this->foreignKey\" IN ('" .
|
return "\"$this->joinTable\".\"$this->foreignKey\" IN ('" .
|
||||||
implode(', ', array_map('Convert::raw2sql', $this->foreignID)) . "')";
|
implode("', '", array_map('Convert::raw2sql', $this->foreignID)) . "')";
|
||||||
} else if($this->foreignID){
|
} else if($this->foreignID){
|
||||||
return "\"$this->joinTable\".\"$this->foreignKey\" = '" .
|
return "\"$this->joinTable\".\"$this->foreignKey\" = '" .
|
||||||
Convert::raw2sql($this->foreignID) . "'";
|
Convert::raw2sql($this->foreignID) . "'";
|
||||||
|
Loading…
Reference in New Issue
Block a user