Feature #80380
closedMissing Distinct / GroupBy option in Query
Added by Benjamin Rannow over 7 years ago. Updated about 6 years ago.
100%
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
Updated by Morton Jonuschat over 7 years ago
- Tracker changed from Bug to Feature
- Category changed from Database API (Doctrine DBAL) to Extbase
Updated by Dirk Wenzel over 7 years ago
@Morton Jonuschat
I'd consider this a bug since I did not observe this behaviour in TYPO3 prior to 8.4.
It happens if query constraints on object storage properties are created using the dot syntax:
```
$constraint = $query->logicalOr([
$query->contains('innerZone.stores', $store),
$query->contains('outerZone.stores', $store)
]);
```
see Benjamin Rannows example extension: https://github.com/brannow/frd_querybug/blob/master/Classes/Domain/Repository/CityRepository.php#L45
Updated by Benni Mack over 7 years ago
- Target version changed from 8 LTS to Candidate for patchlevel
Updated by Oliver Hader over 7 years ago
The behavior has been changed in https://github.com/TYPO3/TYPO3.CMS/commit/c5da264c816b56d1f20ab29e18b6597bb4435534#diff-0eba7a5ae15d87f7b606a6411df68c04L793 when DISTINCT
has been removed from the source codes. This change has been releases the first time with TYPO3 CMS 8.4.0
Updated by Oliver Hader over 7 years ago
Just posting this one for the record during analyzing the code
https://github.com/TYPO3/TYPO3.CMS/commit/d64ba0cafacc61c4745c51ec746f77a3ab855065
Updated by Christian Kuhn over 7 years ago
- Related to Task #80014: Remove extbase ensureCorrectPostOrderingByCategoryTitle test added
Updated by Christian Kuhn over 7 years ago
- Related to Bug #81490: Missing DISTINCT when building query with left joins in extbase repository added
Updated by Gerrit Code Review over 7 years ago
- Status changed from New to Under Review
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53670
Updated by Gerrit Code Review over 7 years ago
Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 21 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 22 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 23 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 24 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 25 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53670
Updated by Gerrit Code Review over 7 years ago
Patch set 26 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 27 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53658
Updated by Gerrit Code Review over 7 years ago
Patch set 3 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53670
Updated by Gerrit Code Review about 7 years ago
Patch set 4 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53670
Updated by Oliver Hader about 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f8aaf85cc5602a45a6f6b949a77ce109bbacc8f8.