[TYPO3-mvc] [!!!] FYI:Changes in last Commit (r987)

Joerg Schoppet joerg at schoppet.de
Thu Jul 30 14:38:37 CEST 2009


Hi,

Jochen Rau schrieb:
> [-TASK] Extbase (Persistence): Removed $useStoragePid from the method 
> signature of $queryFactory->create($className).
> [!!!][~TASK] Extbase (Persistence): All Query Settings are now stored 
> inside a QuerySettings object. It is created and injected by the Query 
> Factory with the default setting. To change the settings, you have to 
> say $query->getQuerySettings(); an manipulate them before executing the 
> Query. The API functions are now called setRespectStoragePageState(TRUE) 
> for PID checking, and setCheckVisibilityState(TRUE) for adding enable 
> fields. The method names may change in future!
I just discovered, that the relations have a pid-statement in the 
where-clause :-(

Following structure:
- User
   - Direntry
     - Directory
   - Dbentry
     - Db

Solved with inline-relations.

In UserRepository I have the following method:
         public function getOrdered() {
                 $query = $this->createQuery();
 
$query->getQuerySettings()->setRespectStoragePageState(FALSE);
                 $query->setOrderings(
                         array(
                                 'name' => 
Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING
                         )
                 );
                 $result = $query->execute();
 
$this->persistenceManager->getSession()->registerReconstitutedObjects($result);
                 return $result;
         }

Doing a var_dump in Typo3Backend->getRows() I see the following:
string(216) "SELECT tx_distributedbackup_domain_model_user.* FROM 
tx_distributedbackup_domain_model_user WHERE 
tx_distributedbackup_domain_model_user.deleted=0 AND 
tx_distributedbackup_domain_model_user.hidden=0 ORDER BY name ASC"
string(282) "SELECT tx_distributedbackup_domain_model_direntry.* FROM 
tx_distributedbackup_domain_model_direntry WHERE user = '2' AND 
tx_distributedbackup_domain_model_direntry.deleted=0 AND 
tx_distributedbackup_domain_model_direntry.hidden=0 AND 
tx_distributedbackup_domain_model_direntry.pid=0"



:-(


Joerg


More information about the TYPO3-project-typo3v4mvc mailing list