[TYPO3-mvc] Find records by difference storage page id

Eat Dimanche dimanche at web-essentials.asia
Thu Jul 1 15:10:18 CEST 2010


Hi all,

I have one class is called Tx_XX_Domain_Model_Comapny which has a 
relationship with Tx_XX_Domain_Model_Country. The company contains a 
country, and for table country it is selected data from static_countries 
table. When I am working on the frontend I want to list all the 
countries in a dropdown, but I can't.

I have tried this in my repository:

1.
public function findCountryByPid() {
$query = $this->queryFactory->create('Tx_XX_Doamian_Model_Country');
	$query->getQuerySettings()->setRespectStoragePage(FALSE);
	$result = $query->matching($query->equals('pid', 0))->execute();
}

2.
public function findCountryByPid() {
$query = $this->createQuery();					 
$query->getQuerySettings()->setRespectStoragePage(FALSE);
$result = $query->matching($query->equals('pid', 0))->execute();
}

I am not sure it is the right way to select records from the difference 
storage page.

Could anyone gives some hint?


Thanks a lot,
Dimanche


More information about the TYPO3-project-typo3v4mvc mailing list