From f564ef5195a2020b591d643da5e44ac6e1553c10 Mon Sep 17 00:00:00 2001 From: Oliver Kaufmann Date: Tue, 22 Sep 2020 23:47:32 +0200 Subject: [PATCH] fix notes filter query --- app/Helpers/Collector/Extensions/MetaCollection.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Helpers/Collector/Extensions/MetaCollection.php b/app/Helpers/Collector/Extensions/MetaCollection.php index 176787f3b2..132a906604 100644 --- a/app/Helpers/Collector/Extensions/MetaCollection.php +++ b/app/Helpers/Collector/Extensions/MetaCollection.php @@ -69,7 +69,7 @@ trait MetaCollection public function notesContain(string $value): GroupCollectorInterface { $this->withNotes(); - $this->query->where('notes', 'LIKE', sprintf('%%%s%%', $value)); + $this->query->where('notes.text', 'LIKE', sprintf('%%%s%%', $value)); return $this; } @@ -80,7 +80,7 @@ trait MetaCollection public function notesEndWith(string $value): GroupCollectorInterface { $this->withNotes(); - $this->query->where('notes', 'LIKE', sprintf('%%%s', $value)); + $this->query->where('notes.text', 'LIKE', sprintf('%%%s', $value)); return $this; } @@ -90,7 +90,7 @@ trait MetaCollection public function withoutNotes(): GroupCollectorInterface { $this->withNotes(); - $this->query->whereNull('notes'); + $this->query->whereNull('notes.text'); return $this; } @@ -101,7 +101,7 @@ trait MetaCollection public function withAnyNotes(): GroupCollectorInterface { $this->withNotes(); - $this->query->whereNotNull('notes'); + $this->query->whereNotNull('notes.text'); return $this; } @@ -112,7 +112,7 @@ trait MetaCollection public function notesExactly(string $value): GroupCollectorInterface { $this->withNotes(); - $this->query->where('notes', '=', sprintf('%s', $value)); + $this->query->where('notes.text', '=', sprintf('%s', $value)); return $this; } @@ -123,7 +123,7 @@ trait MetaCollection public function notesStartWith(string $value): GroupCollectorInterface { $this->withNotes(); - $this->query->where('notes', 'LIKE', sprintf('%s%%', $value)); + $this->query->where('notes.text', 'LIKE', sprintf('%s%%', $value)); return $this; }