Skip to content

Commit 1635e5b

Browse files
authored
Merge pull request #17 from ukfast/relationship-bug
Relationship mapping now correctly identifies relationship vs column
2 parents 6a44871 + d4301b8 commit 1635e5b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/MapFilter.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ public function wrap(ModifiesQueries $filter)
2121
public function modifyQuery($query, SearchTerm $search)
2222
{
2323
if (strpos($this->column, '.') !== false) {
24-
[$relationship, $relCol] = explode(".", $this->column);
24+
$parts = explode(".", $this->column);
25+
$relCol = array_pop($parts);
26+
$relationship = implode(".", $parts);
27+
2528
$relSearch = new SearchTerm(
2629
$search->property(),
2730
$search->operator(),

0 commit comments

Comments
 (0)