[TYPO3-mvc] Respect storage page ignored on object properties
Jochen Rau
jochen.rau at typoplanet.de
Fri May 28 00:06:52 CEST 2010
Hi Thomas,
sorry for jumping into this discussion late. After the the T3CON in
Dallas I had to proof read the Extbase/Fluid book first.
On 27.05.10 18:31, Thomas "Thasmo" Deinhamer wrote:
> Okay, I think I found the place where things are either not yet
> implemented or just not working correctly.
>
> In file 'Typo3DbBackend.php' on line 752 in the method
> 'addAdditionalWhereClause' the query settinsg are checked if the storage
> page should be set or not. If, then the method 'addPageIdStatement' on
> line 802 is called which adds the storage pid restriction. But for MM
> tables it won't do this, because there's an if statement, checking some
> conditions of the TCA, where MM tables won't pass because they don't
> match a specific TCA configuration.
>
> So I think in the method 'addPageIdStatement' there should be the logic
> to check if the table is a MM table, and if so, the origin-table should
> be determined and then it's possible to add the correct where clause.
>
> I'm not 100% sure if this will work, but I think it's the problem when
> querying MM tables with a LEFT JOIN, but fetching the fields of the
> origin table.
>
> Any idea how to extend the method to enable a storage page for left joins?
Fetching *related* records ignoring the PID is the intended behavior
atm. Somebody must have consciously assigned this object to its parent.
So I agree to Sebastian here. But this doesn't mean that we are right.
IMO the whole PID topic is worth to be discussed again to improve or at
least to clarify the things.
The described behavior is determined in the DataMapper in line 357 as
you already pointed out:
$query->getQuerySettings()->setRespectStoragePage(FALSE);
You already changed the argument to TRUE (or uncommented the line). And
here you encountered an issue (thanks for that). The PID constraint was
not added as it should have been. The issue should be fixed by applying
the (hopefully) attached patch. Would you mind to test it?
Regards
Jochen
More information about the TYPO3-project-typo3v4mvc
mailing list