0

(I use typo3 4.5 with extbase-extension.)

I was map the pages_language_overlay to my extbase-model

Tx_Extension_Domain_Model_ModelName {
    mapping {
        tableName = pages_language_overlay
    }
}

I created a model Tx_Extension_Domain_Model_ModelName with some setters and getters. after adding the repository Tx_Extension_Domain_Repository_ModelNameRepository with

public function initializeObject() {
    $this->defaultQuerySettings = $this->objectManager->create('Tx_Extbase_Persistence_Typo3QuerySettings');
    $this->defaultQuerySettings->setRespectStoragePage(FALSE);
}

and inject the repository like this

public function injectModelNameRepository(Tx_Extension_Domain_Repository_ModelNameRepository $modelNameRepository) {
    $this->modelNameRepository = $modelNameRepository;
}

i can not select entries with findByPid. I was testing it with findByUid and echo the pid and it works, but i get no results with findByPid.

Someone has an idea?

freshp
  • 525
  • 5
  • 20

1 Answers1

1

I only have to add

public function initializeObject() {
    $this->defaultQuerySettings = $this->objectManager->create('Tx_Extbase_Persistence_Typo3QuerySettings');
    $this->defaultQuerySettings->setRespectStoragePage(FALSE);
    $this->defaultQuerySettings->setRespectSysLanguage(FALSE);
}

after this it works well. Otherwise the query has a check like

AND pages_language_overlay.sys_language_uid IN (0,-1)

in the where clause.

freshp
  • 525
  • 5
  • 20