Fix segment and newsletter listing SQL to work with ONLY_FULL_GROUP_BY
[MAILPOET-3115]
This commit is contained in:
committed by
Veljko V
parent
d89e68fd2c
commit
5550f5eef2
@@ -268,6 +268,7 @@ class Segment extends Model {
|
||||
[MP_SUBSCRIBER_SEGMENT_TABLE . '.subscriber_id', '=', MP_SUBSCRIBERS_TABLE . '.id'])
|
||||
->groupBy(self::$_table . '.id')
|
||||
->groupBy(self::$_table . '.name')
|
||||
->groupBy(self::$_table . '.type')
|
||||
->orderByAsc(self::$_table . '.name')
|
||||
->whereNull(self::$_table . '.deleted_at');
|
||||
|
||||
|
@@ -51,6 +51,7 @@ class NewsletterListingRepository extends ListingRepository {
|
||||
->join('n.newsletterSegments', 'ns')
|
||||
->join('ns.segment', 's')
|
||||
->groupBy('s.id')
|
||||
->addGroupBy('s.name')
|
||||
->orderBy('s.name')
|
||||
->having('COUNT(n) > 0');
|
||||
|
||||
|
Reference in New Issue
Block a user