[TYPO3-mvc] fetching data from pages table

Michael Staatz info at mduttlinger.de
Mon Mar 1 15:50:30 CET 2010


Am 19.02.2010 15:48, schrieb Alex Bailey:
> Hi,
> 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?
>
> Thanks in advance
>
> Alex

Hi, i have seen that you use the table "pages". I need to read data from 
the table "pages" and, if needed, create new entries. I will do this 
from a frontend - plugin.

I have tried it with an
  - Classes/Domain/Model/Pages.php
	class Tx_Myextension_Domain_Model_Pages extends ... {}
  - Classes/Domain/Repository/PagesRepository.php
	class Tx_Myextension_Domain_Repository_PagesRepository extends ...{}
  - in the setup.txt of my extension i added:
config.extbase.persistance.classes {
	Tx_Myextension_Domain_Model_Pages {
         mapping{
             tableName = pages
         }
     } 	
}

When i try (in the controller) to instanciate the repository and then
call $pages = $pagesRepositry->findAll(); i get an errormessage that my 
Model does not implements DoimainObjectInterface ...


Any hints on reading and writing TYPO3 - Databasetables, like pages, 
tt_content or somewhat else??

Best,

Michael




More information about the TYPO3-project-typo3v4mvc mailing list