Project

General

Profile

Actions

Bug #20264

closed

t3lib_queryGenerator not respecting MM-relation when creating query

Added by Peter Russ over 15 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Start date:
2009-04-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.1
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

At direct mail special query using t3lib_queryGenerator to build the query t3lib_queryGenerator doesn't respect MM-relation when bulding the query.

Create several address groups e.g.
Mailorder, Party, Common

In direct mail create a recipient list using special query and do a select on one of the addressgroups
In the editor everything look fine as you get the names of the groups correctly. But the compile query is wrong as it doesn't reflect the join.
Example:
Party has the uid 2 in the adressgroup.
The compiled query:
SELECT uid,pid,deleted FROM tt_address WHERE addressgroup = '2' AND tt_address.deleted=0

But as addressgroup is a MM-relation the value of the field is just the count of realtions.
So performing that query will only return only address with two addressgroups added and NOT with addressgroup=2

(issue imported from #M10826)


Files

tt_address_groups.patch (808 Bytes) tt_address_groups.patch Patch for direct_mail <-> tt_address_group_mm Mark Boland, 2013-05-28 17:12
Actions #1

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #2

Updated by Mark Boland over 11 years ago

Alexander Opitz wrote:

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

It does.

I wrote a simple patch that adds the needed comparison '74' for tt_address_group_mm table to the instance of the QueryGenerator class. You can then select the new 'Address Group' relation from the Special Group for the field 'Group' of 'Address'.

This patch was inspired by the comment Georg Ringer added to issue #25899.

A far better solution would be to let QueryGenerator use MM relations when found in TCA.

Actions #3

Updated by Alexander Opitz over 11 years ago

  • Status changed from Needs Feedback to New
Actions #4

Updated by Mathias Schreiber almost 10 years ago

  • Target version set to 7.4 (Backend)
  • Is Regression set to No
Actions #5

Updated by Susanne Moog over 9 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #6

Updated by Benni Mack about 9 years ago

  • Target version changed from 7.5 to 7 LTS
Actions #7

Updated by Mathias Schreiber about 9 years ago

  • Target version changed from 7 LTS to 8 LTS
Actions #8

Updated by Benni Mack over 7 years ago

  • Target version changed from 8 LTS to Candidate for Major Version
Actions #9

Updated by Susanne Moog about 7 years ago

  • Category set to Database API (Doctrine DBAL)
Actions #10

Updated by Susanne Moog over 4 years ago

  • Status changed from New to Closed

This report is very old and has gathered little interest. The QueryGenerator and corresponding module are meant as a very basic view for the database, not as a full-fledged administration tool. At this point in time, there is no feature implemented to handle MM relations in the QueryGenerator and the implementation is currently not planned. If anyone wants to work at this, please feel free to push a patch and re-open the issue, I'm closing this now due to age and priority.

Actions

Also available in: Atom PDF