Project

General

Profile

Actions

Feature #80380

closed

Missing Distinct / GroupBy option in Query

Added by Benjamin Rannow over 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Start date:
2017-03-21
Due date:
% Done:

100%

Estimated time:
PHP Version:
7.1
Tags:
Complexity:
Sprint Focus:

Description

I encounter this Problem under Typo3 8.6.1

my Problem, I try to get objects with a condition which created joins.
my Result contains duplicate Records.

Example:
my Database contains 3 Records (CityA, CityB, CityC)
every city has 2 Pools of Zones which contains some Stores.

Some Stores are zone overlapping, which means,
CityA with innerZone1 contains StoreA and CityB with outerZone3 contains also StoreA

Now i want all Cities with a Specific store.
In our Example "Get all Cities which contains StoreA" will not only Result CityA, CityB ...
the Actual Result is [CityA, CityA, CityB, CityB].

I have no chance to use an GroupBy or Distinct :(
See: https://github.com/brannow/frd_querybug/blob/master/Classes/Domain/Repository/CityRepository.php#L47-L59

For better understanding I created a proof of concept Extension for this behavior.
https://github.com/brannow/frd_querybug


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Task #80014: Remove extbase ensureCorrectPostOrderingByCategoryTitle testClosedMorton Jonuschat2017-02-25

Actions
Related to TYPO3 Core - Bug #81490: Missing DISTINCT when building query with left joins in extbase repositoryClosed2017-06-06

Actions
Actions

Also available in: Atom PDF