[TYPO3-mvc] fetching data from pages table

Alex Bailey vile at planet-generals.de
Mon Feb 22 18:40:39 CET 2010


Hey guys :),

I've used $query->getQuerySettings()->setRespectStoragePage(FALSE); to 
overwrite the settings and finally got it to work.

Thanks for the great help!

Regards

Alex

Am 19.02.10 16:28, schrieb Jochen Rau:
> Hi Alex.
>
> On 19.02.10 15:48, Alex Bailey wrote:
>> Im currently working on a extension where I have to fetch the fields of
>> my Pages table, I already mapped the table to match my extension by using
>>
>> config.tx_extbase.persistence.classes{
>> Tx_T3wVvsTags_Domain_Model_Page{
>> mapping{
>> tableName = pages
>> }
>> }
>> }
>>
>> But for some particular reason a findAll() query on my table only
>> returns the pages with Pid 0 and not all of them (unique uid) as it
>> should.
>> Is there something I'm missing about using this table?
>
> The reason for this behavior is the slightly different semantic of pid
> in the pages table compared to the other tables. It means "parent page
> uid" (in comparison to "is on page with uid").
>
> I assume that you haven't defined any storage pid (dafault is 0). So,
> Extbase "thinks" that it has to query for pages "on page" 0.
>
> Solution: follow Steffens tip and set
> $querySettings->setRespectStoragePage(FALSE);
>
> Additionally you can define a mapping like:
>
> config.tx_extbase {
> persistence{
> classes {
> Tx_Voila_Domain_Model_Structure_PageNode {
> mapping {
> tableName = pages
> columns {
> pid.mapOnProperty = parentNodeIdentifier
> }
> }
> }
> }
> }
> }
> }
>
> Regards
> Jochen
>
> P.S. EXT:voila is my locally running replacement fore TemplaVoila ;-)
>



More information about the TYPO3-project-typo3v4mvc mailing list